change
return(MathRound(inval/2));
to return(MathMax(7,MathRound(inval/2)));
WOW!!
You solve my problem for days in just a few moment. May I know how do you find the problem? So if I'll find the same problem in the future I won't bother you anymore.
Thank you!
sometime iRSI maybe is 0, Maybe 0 can not be used as parameter of MA.
So I use MathMax limit the parameter of MA to >=7
I see, I didn't know that before. Thanks for the new insight.
May I ask why "7"? I change it to "2", looks working too, anything else I don't know yet?
Thank you!
You agree to website policy and terms of use
Hi all,
Is anybody know why the attached file not working? In short I'm trying to use a dinamic MA_Period. And it's working in more simple codes below.
"test.mq4" (attached) is not working, please pay attention to "int MA_Period = perd(y);" line.
The dinamic MA Period is working in the codes below:
I'm trying to put all codes here, but I get a "Too Long" alert. I really appreciate your help.
Thank you