Back Test 315 strategy

This is my second question and I was not very happy how the first one was answered, so please take extra care to understand what I am trying to back-test

Entry on End of Day levels only

Buy Nifty current month future if 3 EMA breaches 15 EMA ( 3 EMA greater then 15 EMA) this position will be squared off in either of two scenarios 1> 3 EMA not touching EOD price of Nifty or if 15 EMA breaches 3 EMA (15 EMA greater then 3 EMA)

1 Like

As per the above given condition

Buy Script:

EMA(CLOSE,3)>EMA(CLOSE,15) AND CROSSOVER(EMA(CLOSE,3),EMA(CLOSE,15))

Sell Script:

EMA(CLOSE,15)>EMA(CLOSE,3) AND CROSSOVER(EMA(CLOSE,3),EMA(CLOSE,15))

Output Screenshot:


1 Like

EOD price of Nifty ? do you mean close price?

Hi AlgoGeek, that is NOT correct, unfortunately, the answer you provide did not work on ‘Pi’, I have screen shots that I would like to share, but I don’t think that is possible here, I am getting the below error message
First error message " Your script generated an error, Error: Script generated no trades"
Once I click ok, I get another error message "No results. Make sure that at least Buy and Sell scripts are typed in"
The other thing that I wanted to ask is
I clearly mentioned what my entry points are and when will I exit my long and short position, you have not told the script that I need to add for those two factors.