Greetings everyone,
I have recently started testing mt5 for algorithmic trading, however I have noticed that all of the codes I wrote had the same issue in the Strategy Tester - floating arrows;
Arrows displaying buy/sell signals appear to be at an offset from the actual chart regardless of the algorithm I am using, if I recall correctly the offset is at a constant 120 pips from the price on the chart. After copying a code from youtube (by Trading Bot Wizard) I hoped to solve the problem by using a simple 30 line code to just check entries and exits but nothing appears to work. If it helps, I have my account set up for OANDA. The pictures attached below are some screenshot which show the problem, and the code I used (which I belive is irrelevant) is First1.mq5 (again, by Trading Bot Wizard on youtube).
Thanks for reading this.
I have to say, go ask Trading Bot Wizard.
Your posted source code contains no arrow drawing code. The arrows in your posted screenshots merely mark the points of your MA crossovers─not price.
Arrows displaying buy/sell signals appear to be at an offset from the actual chart regardless of the algorithm I am using,
For Buy, the Ask price is used, and for Sell, the Bid price is used. Considering that both Buy and Sell prices deviate from the chart, I suspect the chart in your screenshot is based on the Last price.
Check the "Chart mode" in the symbol properties. Or try testing on a symbol whose "Chart mode" is set to "By bid price".

I have to say, go ask Trading Bot Wizard.
Your posted source code contains no arrow drawing code. The arrows in your posted screenshots merely mark the points of your MA crossovers─not price.
For Buy, the Ask price is used, and for Sell, the Bid price is used. Considering that both Buy and Sell prices deviate from the chart, I suspect the chart in your screenshot is based on the Last price.
Check the "Chart mode" in the symbol properties. Or try testing on a symbol whose "Chart mode" is set to "By bid price".
It is indeed, however it appears that every symbol available is using the same "by last price" mode; I cannot change it nor make a custom symbol, so I belive it is an OANDA limitation and there isn't much I can do about it.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Greetings everyone,
I have recently started testing mt5 for algorithmic trading, however I have noticed that all of the codes I wrote had the same issue in the Strategy Tester - floating arrows;
Arrows displaying buy/sell signals appear to be at an offset from the actual chart regardless of the algorithm I am using, if I recall correctly the offset is at a constant 120 pips from the price on the chart. After copying a code from youtube (by Trading Bot Wizard) I hoped to solve the problem by using a simple 30 line code to just check entries and exits but nothing appears to work. If it helps, I have my account set up for OANDA. The pictures attached below are some screenshot which show the problem, and the code I used (which I belive is irrelevant) is First1.mq5 (again, by Trading Bot Wizard on youtube).
Thanks for reading this.