Type/to search

Super Trend Tracking Stop Loss Strategy

Cryptocurrency
Created: 2023-12-19 11:20:15
Last modified: 2 years ago
1
Follow
1778
Followers

img

Overview

This strategy opens and closes positions based on the Super Trend indicator and trailing stop loss. It uses 4 alerts to open and close long and short positions, and adopts a super trend strategy. The strategy is designed specifically for robots with trailing stop loss functionality.

Strategy Logic

The strategy uses the ATR indicator to calculate the upper and lower bands. A buy signal is generated when the closing price breaks through the upper band, and a sell signal is generated when it breaks through the lower band. The strategy also uses a super trend line to determine the trend direction. When the super trend line goes up, it indicates the start of a bull market. When it goes down, it indicates the start of a bear market. The strategy opens positions when a signal is generated, and sets the initial stop loss price. It then adjusts the stop loss price based on price changes to lock in profits and achieve a trailing stop loss effect.

Advantage Analysis

The strategy combines the advantages of the Super Trend indicator for determining trend direction and the ATR indicator for setting stops. It can effectively filter out false breakouts. Trailing stops can lock in profits very well and reduce drawdowns. In addition, the strategy is designed specifically for robots, enabling automated trading.

Risk Analysis

The Super Trend indicator can easily generate more false signals. When the stop loss adjustment range is large, the probability of stop loss being hit increases. In addition, robot trading also faces technical risks such as server crashes and network interruptions.

To reduce the probability of false signals, the ATR parameters can be adjusted appropriately or other indicators can be added for filtration. When adjusting the trailing stop range, profit and risk need to be balanced. At the same time, prepare backup servers and networks to hedge against technical failure risks.

Optimization Directions

The following are some directions in which this strategy can be optimized:

  1. Add indicators or conditions to filter entry signals and avoid false signals. For example, the MACD indicator can be added.

  2. Test different ATR parameter combinations to find the optimal parameters.

  3. Optimize the trailing stop loss range to find the best balance point.

  4. Add more stop loss prices to achieve batch stopping of losses.

  5. Build a dual-server architecture with primary and standby servers that can quickly switch when the main server fails.

Conclusion

This strategy integrates the advantages of the Super Trend indicator and trailing stop loss for automated opening and stopping of losses. Combined with the improvement measures in the optimization directions during live trading, it can become a very practical quantitative trading strategy.

Source
Pine
/*backtest
start: 2023-11-18 00:00:00
end: 2023-12-18 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © arminomid1375
//@version=5
strategy('Mizar_BOT_super trend', overlay=true, default_qty_value=100, currency=currency.USD, default_qty_type=strategy.percent_of_equity, initial_capital=100, max_bars_back=4000)
Strategy parameters
Strategy parameters
From Month
From Day
From Year
To Month
To Day
To Year
ATR
ATR Factor
ATR Period
stop loss
trailing stop ?
trailing stop %
take profit
Take profit1 On/Off ?
TP1 %
TP1 Amount %
Take profit2 On/Off ?
TP2 %
TP2 Amount %
Take profit3 On/Off ?
TP3 %
TP3 Amount %
Alert Messages
Long Alert Message
Long close Alert Message
Short Alert Message
Short close Alert Message
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)