Help with this backtesting script

M

MikelL

New member
I built this indicator and i really like it, but i want to back test the strategy i have for it but i don't know how. So if someone could help me that would be incredible! Here is the code and below I'll explain the strategy. I run this on the ES
Code:
input sPeriod = aggregationPeriod.DAY;
input stop = 10;

plot pClose = close(period = sPeriod)[1];
plot shortLine = ((close(period = sPeriod)[1] * .25) / 100) + close(period = sPeriod)[1];
plot buyLine = close(period = sPeriod)[1] - ((close(period = sPeriod)[1] * .25) / 100);
plot shortStop = shortline + stop;
plot longStop = buyLine - stop;

so I want to short the shortLine and take profit at the pClose with a stop at the shortStop and vice versa (buy buyLine take profit pClose stop longStop)
I also would like it to exit any open position and stop at close (4pm eastern) and start again in globeX (6pm eastern)
 

Similar threads

Top