Type/to search

SuperTrend with Stop Loss Trailing Strategy

Cryptocurrency
Created: 2023-09-18 16:05:31
Last modified: 3 years ago
1
Follow
1781
Followers

Overview

This strategy uses the SuperTrend indicator to determine price trend and incorporates a stop loss mechanism for trend following trades. SuperTrend is constructed from two moving averages. Go long on upward crossover and short on downward crossover. A stop loss is set to avoid excessive losses.

Strategy Logic

Calculate DEMA of fast and slow lines. SuperTrend direction is determined from the difference between the two lines. In uptrends, fast line crossing above slow line signals long entry. In downtrends, fast line crossing below slow line signals short entry. After entry, a stop loss line is set. If loss reaches stop loss percentage, position is closed.

Advantages

  • SuperTrend effectively determines price trend
  • Stop loss controls single trade risk
  • Different parameter sets can be used for different periods
  • Good drawdown control ability

Risks

  • Moving averages lag in trend detection
  • Stop loss set too wide may expand losses
  • High trade frequency increases transaction costs
  • Exact reversal points cannot be accurately determined

Risks can be mitigated by shortening moving average periods, optimizing stop loss percentage, reducing trade frequency etc.

Enhancements

  • Test different fast/slow line parameter combinations
  • Optimize stop loss percentage
  • Consider adding other indicators to determine trend reversal
  • Test robustness across different products

Conclusion

This simple strategy uses indicators for trend direction and stop loss for risk control, suitable for intraday trading. Performance can be further improved through parameter tuning.

Source
Pine
/*backtest
start: 2023-09-10 00:00:00
end: 2023-09-13 00:00:00
period: 2m
basePeriod: 1m
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/

//@version=3
strategy(title = "[Prod] SuperTrend with Stoploss+TrendZones - 1H", default_qty_type=strategy.percent_of_equity, default_qty_value=100, shorttitle = "[Prod] SuperTrend with Stoploss+TrendZones - 1H", overlay = true, commission_type=strategy.commission.percent, commission_value=0.3)
//--cyberfunk 2018 
 
Strategy parameters
Strategy parameters
Length
Multiplier
fastPeriod
slowPeriod
resolution
stopLossPercentage
letItRidePercentage
Uptrend FastPeriod
Uptrend SlowPeriod
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)