iRSI based on time period (M1,M5,..etc)

 

Hi, I've created a simple script that buys/sells on a parabolic reversal.



During for instance the period between May 20-May 24, the parabolic is downtrending, yet when using the Tester, there are several buy/sell short/cover transactions that occur during this time. I have set the period in the tester to H1. Upon closer inspection (i.e. zooming in on this time period), there are a few reversals in the trends, but I want it to use the H1 chart. I use:

double curSar = iSAR(NULL,1,0.02,0.2,0);

if (curSar < Bid && prevSar > curSar) { BUY! } //upward reversal


Could someone please suggest how to expand this to the M5, M15, 1H, etc.. charts? Thanks!

 
xholydivinity:

double curSar = iSAR(NULL,1,0.02,0.2,0);


Your time period is incorrect. use 0 for current chart or one of the specified variables

https://docs.mql4.com/constants/timeframes

V

 
Viffer:

Your time period is incorrect. use 0 for current chart or one of the specified variables

https://docs.mql4.com/constants/timeframes

V


Thanks so much for your help!
Reason: