Line drop from array and buffer data

 
Hi Gurus,
I am not an expert, but I have been able to draw lines taking data from an array to feed a buffer.
I don't know how to phrase my problem. When the line is drawn, at the end it drops to come back to the actual price.

Please, any clue will be appreciated. Please see attached picture it will be easier to understand.


https://charts.mql5.com/9/269/gbpusd-d1-fxpro-financial-services-2.png


Files:
GBPUSDDaily.png  69 kb
 
teja:
Hi Gurus,
I am not an expert, but I have been able to draw lines taking data from an array to feed a buffer.
I don't know how to phrase my problem. When the line is drawn, at the end it drops to come back to the actual price.

Please, any clue will be appreciated. Please see attached picture it will be easier to understand.


https://charts.mql5.com/9/269/gbpusd-d1-fxpro-financial-services-2.png


You have a bug when calculating the indicator buffer. You miss the calculation [1] bar.
 
Karputov Vladimir:
You have a bug when calculating the indicator buffer. You miss the calculation [1] bar.
Thank you Vladimir a good hint to search the database.
 
Karputov Vladimir:
You have a bug when calculating the indicator buffer. You miss the calculation [1] bar.

Thanks again Vladimir, I have lost time trying to figure out.

Brilliant!

Problem solved.

Reason: