OPEN-SOURCE SCRIPT
Updated EMA Envelope Stepgain

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.
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. Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.