OPEN-SOURCE SCRIPT

EMA Envelope Stepgain

Updated
This indicator shows a close approximation to what Gunbot would use in its GAIN and STEPGAIN strategies.

The middle two lines are the EMA(2h) and EMA(4h) lines. The inner two grey lines are BUYLVL2/SELLLVL2, the outer grey lines are just there to constrain the color bands. The green and red bands are indicators of where the candle has exceeded your setting and Gunbot would start considering buying or selling.
Release Notes
Switch to using bgcolor which feels a little nicer to me. Also, using `na` as the default background will prevent a hidden white overlay.
Release Notes
Set defaults that demonstrate the functionality better. Also, remove an extra indicator from the preview.

Part of a pack with:
EMA envelope:
EMA Envelope

Stepgain simulator:
EMA Envelope Stepgain

Stepgain explorer:
EMA Envelope Stepgain Explorer

Bollinger bands explorer:
Bollinger Bands Explorer

Exponential Moving Average (EMA)gunbot

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