
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
Hi all,
Rookie/noob here, thinking he figured out the issue but failed again. I have been working on this for a couple days and thought i fixed it last night by resizing the arrays. As you can see below the close shows 1.10374 for the second last candle. Assuming based on the code is states that it is the current bar but the previous bar or none of the others close by seem to have a closing price of 1.10397.
My question is, is this a code issue or a data issue with my mt5? I had issues with this the last couple days which i thought i resolved by resizing the arrays. This is also making my back test inaccurate/ I'd like to also add when testing on real data it does the same thing where the current bar shows the previous closing price and the previous bar shows the current closing price:

It went from consistently showing the previous bar data in the print statement for current bar (and vice versa) to now showing another close bar price (i have made some updates along the way but still data price issue).
The area below shows the section of code, any help would be much appreciated: