Amir Yacoby: Its from documentation not me. 8 is for any
two doubles(its calculated to be minimum diffeeence allowed for double size).
But for 2 prices you can use _Point as Ernst suggested which is the smallest difference for forex prices.
Its working without it because the min difference for two forex bids is Point which is larger then 8 decimals
if(NormalizeDouble(Bid-BidPrevious,8)!=0)
{ Print(Bid);
BidPrevious=Bid;
// only when printed
}
I realize Ernst suggested comparing to _Point instead of 0 however I don't think I'm understanding your reasoning about the usage of
_Point in your version of the solution or in any of the solutions in this thread; Where would you suggest using _Point in there? Instead of
0 in order to have a larger reference to compare so as to keep a more noticeable bias or something along those lines? You really think its
going to make a difference?
I realize Ernst suggested comparing to _Point instead of 0 however I don't think I'm understanding your reasoning about the usage of
_Point in your version of the solution or in any of the solutions in this thread; Where would you suggest using _Point in there? Instead of
0 in order to have a larger reference to compare so as to keep a more noticeable bias or something along those lines? You really think its
going to make a difference?
Normalize to tick size as you did is better then point.
Apparently something went wrong when I tried this approach on my own first before posting and after trying this approach again I can confirm it was in fact
also a working solution. Many thanks
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.
AWESOME!!!!! That works!!!
Its all just 0 after Digits; why use 8? Working without it, but I'd like to know why you prefer 8
Like to use that function instead as I heard horror stories about Normalize Double
Its from documentation not me. 8 is for any two doubles(its calculated to be minimum diffeeence allowed for double size).
Print(Bid);
}
I realize Ernst suggested comparing to _Point instead of 0 however I don't think I'm understanding your reasoning about the usage of _Point in your version of the solution or in any of the solutions in this thread; Where would you suggest using _Point in there? Instead of 0 in order to have a larger reference to compare so as to keep a more noticeable bias or something along those lines? You really think its going to make a difference?
Print(Bid);
}
I realize Ernst suggested comparing to _Point instead of 0 however I don't think I'm understanding your reasoning about the usage of _Point in your version of the solution or in any of the solutions in this thread; Where would you suggest using _Point in there? Instead of 0 in order to have a larger reference to compare so as to keep a more noticeable bias or something along those lines? You really think its going to make a difference?
Try: Print(DoubleToString(Bid));
Apparently I was also incorrectly implementing your solution as I can now confirm its also a working fix. THX
Should've posted my incorrect code so as to be clear what was doing wrong and be further educated