OPEN-SOURCE SCRIPT

EMA Crossover

Updated
EMA Crossover

Input Parameters:

Stop loss (ticks) - define stop loss in unit of ticks (*1 tick = 12.5)
Exit signal - 1: When EMA and price crosses
2: When EMA changes direction
Start year, month, day & Stop year, month, day - define backtest period


You can set Order size, Commission in Settings, Properties tab.
Release Notes
Updated default Start Hour, End Hour
Release Notes
updated Long / Short condition
Release Notes
Replaced crossover, crossunder with comparison
Release Notes
Added colors for testing
Release Notes
Updated Test Period Stop
Release Notes
Updated date time range
Release Notes
Updated exit conditions, background
Release Notes
Skip a few bars after placing order
Exponential Moving Average (EMA)

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