for(i=Limit; i>=0; i--) Cross2Buffer[i]=0; for(i=Limit-MathMax(RSIPeriod1,RSIPeriod2); i>=0; i--) { HighRange = Cross1Buffer[ArrayMaximum(Cross1Buffer, Cross2, i)]; LowRange = Cross1Buffer[ArrayMinimum(Cross1Buffer, Cross2, i)]; delta = Cross1Buffer[i] - LowRange; DSS = delta/(HighRange - LowRange)*100.0; Cross2Buffer[i] =smooth_coefficient * (DSS - Cross2Buffer[i+1]) + Cross2Buffer[i+1]; }Try this code..
fai:
Try this code..
Try this code..
leMai
Unfortunatelly I don't understand why I have to use MathMax and now I wanted to try the same thing with another indicator, and it didn't work because I don't have two extern ints, I only have one.
So what now?
Thanks for you help
leMai
So what now?
int start() { Draw4HowLong = Bars-Rperiod - 5; length = Rperiod; loopbegin = Draw4HowLong - length - 1; int Limit=ArraySize(ExtMapBuffer1); for(shift = loopbegin; shift >= 0; shift--) { sum[1] = 0; for(i = length; i >= 1 ; i--) { lengthvar = length + 1; lengthvar /= 3; tmp = 0; tmp = ( i - lengthvar)*Close[length-i+shift]; sum[1]+=tmp; } wt[shift] = sum[1]*6/(length*(length+1)); ExtMapBuffer1[shift] = wt[shift]; } for(i=Limit; i>=0; i--) ExtMapBuffer2[i]=0; for(i=Limit-MathMax(Rperiod,Rperiod); i>=0; i--) { HighRange = ExtMapBuffer1[ArrayMaximum(ExtMapBuffer1, Cross, i)]; LowRange = ExtMapBuffer1[ArrayMinimum(ExtMapBuffer1, Cross, i)]; delta = ExtMapBuffer1[i] - LowRange; DSS = delta/(HighRange - LowRange)*100.0; ExtMapBuffer2[i] =smooth_coefficient * (DSS - ExtMapBuffer2[i+1]) + ExtMapBuffer2[i+1]; }Now the value of ExtMapBuffer1 is huge and very flat, but ExtMapBuffer2 is just a line!
Thanks for you help
leMai

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have just coded this:
It shows the red and the blue line, but not the green one!
What is wrong with my code? Can you help me?
Thanks
leMai