
This is a strategy that utilizes key levels on different timeframes to generate double breakout trading signals. It can enter long or short positions when trend prices break through key support or resistance levels to capture mid-to-long term trends.
The strategy analyzes price action simultaneously on two different timeframes (tf and tf2), with tf being the longer timeframe reflecting the mid-to-long term trend, and tf2 being the shorter timeframe reflecting short-term moves. The strategy monitors the following trading signals:
The trading signal is formed when up1 and up2 are true together, indicating long and short term are both bullish, go long; when dn1 and dn2 are both true, indicating long and short term both bearish, go short.
The strategy also incorporates some filters such as inverse scalping and color candlesticks to avoid wrong signals from non-trending breakouts.
Overall, the strategy takes full advantage of multi-timeframe analysis, ensuring the mid-to-long term trend meets expectations while avoiding interference from short-term market noise, generating high quality trading signals.
By monitoring key level breakouts across two timeframes, it can capture clear entry signals at trend initiation stages.
Requiring concurrent breakouts on two different timeframes greatly lowers false signals from random fluctuations, improving signal quality.
Adding inverse scalping and color candle filters can remove some low quality breakout signals and prevent huge losses.
The strategy only needs two timeframe parameters to function, offers flexible tuning for different products.
The clear structure makes it easy to understand the logic, and parameters can be adjusted based on market conditions for optimization.
Compared to single breakout, dual breakout may cause some entry delay, missing early strong trend profits.
Selecting suitable key levels for different products and market cycles is very important, otherwise it may generate false signals.
Even with dual breakout, there is still a chance of breakout failure and fast pullback, causing losses.
Late trend entries may face sudden reversal, unable to exit in time through stop loss and incur large losses.
Although simple, finding the optimal parameter set still requires extensive testing, with high optimization difficulty.
Can set trailing stop or time stop to stop loss before loss gets too big.
Can test different inverse scalp amplitude parameters or other filter methods.
Make key levels change dynamically with market shifts rather than static levels.
Use machine learning to optimize best parameter sets for different products.
Incorporate volume confirmation to avoid false breakout signals without volume.
Overall this is a simple and practical trend following strategy. By analyzing two timeframes it enters on mid-to-long term direction conformity to filter noise effectively. The signals are clear and easy to interpret, with intuitive parameter settings. But it also has issues like mistimed entry, difficulty selecting key levels. In summary, this strategy works better as a trend validation tool to combine with other factors, but still has much room for optimization as a standalone trading system.
/*backtest
start: 2023-10-15 00:00:00
end: 2023-11-14 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//Noro
//2018
//@version=2
strategy(title = "Noro's Levels Strategy v1.0", shorttitle = "Levels str 1.0", overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, pyramiding = 0)
//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(true, defval = true, title = "Short")
capital = input(100, defval = 100, minval = 1, maxval = 10000, title = "Capital, %")
tf = input('W', title = "timeframe 1")
tf2 = input('D', title = "timeframe 2")
src = input(ohlc4, "Source")
ap = input(true, defval = true, title = "antipila")
cf = input(true, defval = true, title = "color filter")
fromyear = input(1900, defval = 1900, minval = 1900, maxval = 2100, title = "From Year")
toyear = input(2100, defval = 2100, minval = 1900, maxval = 2100, title = "To Year")
frommonth = input(01, defval = 01, minval = 01, maxval = 12, title = "From Month")
tomonth = input(12, defval = 12, minval = 01, maxval = 12, title = "To Month")
fromday = input(01, defval = 01, minval = 01, maxval = 31, title = "From day")
today = input(31, defval = 31, minval = 01, maxval = 31, title = "To day")
//Signals
level = request.security(syminfo.tickerid, tf, src[1])
level2 = request.security(syminfo.tickerid, tf2, src[1])
plot(level, linewidth = 3, color = silver)
plot(level2, linewidth = 3, color = gray)
up1 = close > level and ap == false ? true : low > level ? true : false
dn1 = close < level and ap == false ? true : high < level ? true : false
up2 = close > level2 and ap == false ? true : low > level2 ? true : false
dn2 = close < level2 and ap == false ? true : high < level2 ? true : false
//Trading
lot = strategy.position_size != strategy.position_size[1] ? strategy.equity / close * capital / 100 : lot[1]
if up1 and up2 and (close < open or cf == false)
strategy.entry("Long", strategy.long, needlong == false ? 0 : lot, when = (time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 23, 59)))
if dn1 and dn2 and (close > open or cf == false)
strategy.entry("Short", strategy.short, needshort == false ? 0 : lot, when = (time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 23, 59)))
if time > timestamp(toyear, tomonth, today, 23, 59)
strategy.close_all()