In this code, the buffer 0 and 1 it working but not displayng on the chart because i want to do so, buffers 2 and 3 is working and displayng on chart and that is ok, the problem is for buffers 4 and 5 the code of them is not make the matematic calcul and not display on chart!
nCountedBars=IndicatorCounted();
//---- last counted bar will be recounted if(nCountedBars<=2)
i=Bars-nCountedBars-3;
if(nCountedBars>2)
{
nCountedBars--;
i=Bars-nCountedBars-1;
}
//----Up and Down Fractalswhile(i>=2)
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
In this code, the buffer 0 and 1 it working but not displayng on the chart because i want to do so, buffers 2 and 3 is working and displayng on chart and that is ok, the problem is for buffers 4 and 5 the code of them is not make the matematic calcul and not display on chart!
Thank you very much for your help!
I wait for answers!
you calculate with these values before they have value, that part is after this line in the code:
this part is better placed after the other calculations in the while loop.
and as angevoyageur also noticed, probably here also you should use i+0, i+1, i+2.
dCurrent<Low[i+6]ExtUpFractalsBuffer[i]=dCurrent; UpRatio[i]=dRatio; UpValue[0]=dUpValue;ExtUpFractalsBuffer[i]=dCurrent; UpRatio[i]=dRatio; UpValue[i]=dUpValue;