Consecutive Bar Breakout Trading Strategy
This strategy trades consecutive upside or downside bar breakouts, judging if recent price action exhibits persistence in one direction. It aims to capture short-term trend opportunities.
Strategy Logic:
-
Check if current bar is up/down versus bars from fixed lookback, e.g. 5 bars ago.
-
Enter long after multiple bars close higher than open.
-
Enter short after multiple bars close lower than open.
-
Use stops to limit loss.
-
Customizable backtest period for optimizing parameters.
Advantages:
-
Consecutive up/down bars determine short-term trends.
-
Real-time alerts possible for monitoring.
-
Simple backtest optimization enables live trading.
Risks:
-
No overall mid/long-term bias, risks whipsaws.
-
Tight stops may prematurely exit.
-
Beware reversals, prudent to actively take profits.
In summary, this short-term tactical strategy has potential based on backtests, but requires caution on reversals and disciplined loss cutting when live trading.
/*backtest
start: 2023-08-13 00:00:00
end: 2023-09-12 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
// strategy("BarUpDn Strategy", overlay=true, initial_capital = 10000, default_qty_value = 10000, default_qty_type = strategy.cash)
BarsUp = input(1)- 1
