Type/to search

Consecutive Bar Breakout Trading Strategy

Cryptocurrency
Created: 2023-09-13 10:53:06
Last modified: 3 years ago
1
Follow
1781
Followers

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:

  1. Check if current bar is up/down versus bars from fixed lookback, e.g. 5 bars ago.

  2. Enter long after multiple bars close higher than open.

  3. Enter short after multiple bars close lower than open.

  4. Use stops to limit loss.

  5. Customizable backtest period for optimizing parameters.

Advantages:

  1. Consecutive up/down bars determine short-term trends.

  2. Real-time alerts possible for monitoring.

  3. Simple backtest optimization enables live trading.

Risks:

  1. No overall mid/long-term bias, risks whipsaws.

  2. Tight stops may prematurely exit.

  3. 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.

Source
Pine
/*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)
Strategy parameters
Strategy parameters
BarsUp
BarsDown
startDate
finishDate
Buy message
Sell message
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)