This is a short-term trading strategy based on the breakout theory. It uses moving average indicators and highest/lowest price indicators to identify breakout signals and capture profits from short-term trends.
The strategy uses 20-day highest price to identify uptrends. When the closing price breaks above the 20-day high, it goes long. It uses 10-day lowest price to identify downtrends. When the closing price breaks below the 10-day low, it goes short. It also uses a 10-day highest price as a stop loss exit signal for short trades.
Specifically, the strategy includes the following rules:
By comparing closing price with highest/lowest prices of different periods, it catches trend breakouts within short-term cycles and makes short-term trades.
The strategy has the following advantages:
There are also some risks:
We can set stop loss to limit per trade loss, or adjust parameter ranges to control trading frequency.
The strategy can be optimized from the following aspects:
In conclusion, this is a simple and practical short-term breakout strategy. It helps to capture short-cycle trend opportunities. But there are risks of being trapped and high trading frequency. By adding filters, stop loss, parameter optimization, we can control risks and improve efficiency. The strategy suits traders focusing on short-term chances and pursuing high turnover rate.
/*backtest start: 2022-11-27 00:00:00 end: 2023-12-03 00:00:00 period: 1d basePeriod: 1h exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=3 strategy("TurtleBC Strategy v2 V.Troussel", shorttitle="TurtleBC-V.Troussel", overlay=true, pyramiding=0) // === BACKTEST RANGE === FromMonth = input(defval = 1, title = "From Month", minval = 1) FromDay = input(defval = 1, title = "From Day", minval = 1) FromYear = input(defval = 2016, title = "From Year", minval = 2016) ToMonth = input(defval = 1, title = "To Month", minval = 1) ToDay = input(defval = 1, title = "To Day", minval = 1) ToYear = input(defval = 9999, title = "To Year", minval = 9999) enter_fast = input(20, minval=1) exit_fast = input(10, minval=1) exit_fast_short=input(10,minval=1) fastL = highest(close, enter_fast) fastS = highest(close ,exit_fast_short) fastLC = lowest(close, exit_fast) //Sortie pour le short exitS=close>fastS[1] enterL1 = close > fastL[1] exitL1 = close <= fastLC[1] strategy.entry("Long", strategy.long, when = enterL1 and (time > timestamp(FromYear, FromMonth, FromDay, 00, 00)) and (time < timestamp(ToYear, ToMonth, ToDay, 23, 59))) strategy.close("Long", when = exitL1 and (time < timestamp(ToYear, ToMonth, ToDay, 23, 59))) //le trigger de sortie est strategy.entry("Short", strategy.short, when = exitL1 and (time > timestamp(FromYear, FromMonth, FromDay, 00, 00)) and (time < timestamp(ToYear, ToMonth, ToDay, 23, 59))) strategy.close("Short", when = exitS and (time < timestamp(ToYear, ToMonth, ToDay, 23, 59)))