It is a long only strategy.
1. Buy when price breaks out of the upper band.
2. Exit has two options. Option 1 allows you to exit using lower band. Option 2 allows you to exit using moving average.
3. Option 1 preferred over option 2 if the instrument is highly volatile.
4. Slippage and commissions are not considered in the return calculation.
Disclaimer: I'm a noob.
I'm trying to implement a script which enter market long position when long EMA crossover short EMA and MACD histogram is positive and histogram at T time is lesser than histogram at T-1.
And when short EMA crossover long EMA, plus MACD histogram is negative and histogram at T is greater than histogram at T-1, I want the...