OPEN-SOURCE SCRIPT

Momentum BF

The momentum strategy is simple, if price action is higher than it was for x bars back, and also higher than it was last candle, we have upwards momentum. This momentum will be positive until a candle closes lower than the previous candle and also lower than x bars back - at which point we have downwards momentum.

The concept behind the Momentum Strategy is that when the momentum crosses from negative to positive, we go long and when it crosses from positive to negative we go short. We stay in that position until momentum crosses back the opposite direction.

INSTRUCTIONS:
  • Go long at the green background on the chart
  • Go short at the red background on the chart
  • The yellow lines are where your stop loss should be for longs
  • The orange lines are where your stop loss should be for shorts


I have included the options in Settings to change the stop loss type between ATR derived and Fixed percentage based. The default stop loss is a fixed 7%.
You can also select if you want only longs, only shorts or both.

The backtest was done with BTCUSD on Coinbase 1D.
Momentum Indicator (MOM)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer