Predefined variable ..Bid.. not resulting same as chart bid value

 

Hello,

If I create a simple script that includes...

int start()
{
Print("****");
Print(" BID :: ", Bid,Digits);
Print("****");
return(0);
}

and then execute it against a chart (GBP/USD for example), the result shown in the Terminal Window (the print statement of the current Bid) does not match what the chart, or market Watch, or Order window shows as the current Bid. Most times the 4th decimal place of the GBP/USD is off and it seems that the 5th decimal is always off.

Is this a result of adding a 5th decimal place the this pair? Has anyone else experienced this? I have verified this issue on 2 different broker's MT4 instances, and received the same results. I have insured that the Bid has not changed in between executing the script and observing the results.

I appreciate some feedback on this.

Regards,

DMMcCollum

 

Use DoubleToStr

Print("Bid=",DoubleToStr(Bid,Digits));