The multiplier is to calculate the SL and TP for 2 to 5 digits broker . The 4 and 5 digits works fine, however the problem lies with the 3 digits broker .
EJ at buy ( or sell ) 140.540, SL and TP for 30 pips should be 140.240 and 140.840 . Should works fine with the 2nd if after initialize . However it shows 140.510 for SL and 140.570 for TP .
If the point == 0.00001 is at the 2nd place instead of the last, the 3 digits works perfectly fine and the problems changes to 4 and 5 digits ....
Doesn't have problem at older build though .
if ( Point == 0.001 ) { Multiplier = 0.01 ; // with 3 Digits, Point = 0.001, so Multiplyer = 0.01 } else { Multiplier = Point ; } if ( Point == 0.00001 ) //Point does not = 0.00001 { Multiplier = 0.0001 ; } else { Multiplier = Point ; //So multiplyer is changed to 0.001 }
No it works fine until now ... How can I change it ...
We help guys don't know what's wrong with the code
they get an answer why it is wrong....
and then they ignore totally the help they get ....
if ( Point == 0.001 ) { Multiplier = 0.01 ; // with 3 Digits, Point = 0.001, so Multiplyer = 0.01 Print("check one Point = ",Point," Multiplier = ",Multiplier); } else { Multiplier = Point ; Print("check two Point = ",Point," Multiplier = ",Multiplier); } if ( Point == 0.00001 ) //Point does not = 0.00001 { Multiplier = 0.0001 ; Print("check three Point = ",Point," Multiplier = ",Multiplier); } else { Multiplier = Point ; //So multiplyer is changed to 0.001 Print("check four Point = ",Point," Multiplier = ",Multiplier); }
Ofcours it works fine...... it suddenly changed
I think if You're wrong you should apologize to GumRai
We help guys don't know what's wrong with the code
they get an answer why it is wrong....
and then they ignore totally the help they get ....
Ofcours it works fine...... it suddenly changed
I think if You're wrong you should apologize to GumRai
I'm sorry cause' I'm dumb enough to not understand the answer .
What I don't understand is, I already have 2 if for 3 and 5 point to change it to 0.01 and 0.0001 .
Why do you all said the last if does not == 0.00001, and why does multiplier change to 0.001 ? It should be 0.0001 if point is not equal to 0.00001 .
I'm sorry cause' I'm dumb enough to not understand the answer .
What I don't understand is, I already have 2 if for 3 and 5 point to change it to 0.01 and 0.0001 .
Why do you all said the last if does not == 0.00001, and why does multiplier change to 0.001 ? It should be 0.0001 if point is not equal to 0.00001 .
if ( Point == 0.001 ) { Multiplier = 0.01 ; // with 3 Digits, Point = 0.001, so Multiplyer = 0.01 Print("check one Point = ",Point," Multiplier = ",Multiplier); } else { Multiplier = Point ; Print("check two Point = ",Point," Multiplier = ",Multiplier); } if ( Point == 0.00001 ) //Point does not = 0.00001 { Multiplier = 0.0001 ; Print("check three Point = ",Point," Multiplier = ",Multiplier); } else { Multiplier = Point ; //So multiplyer is changed to 0.001 Print("check four Point = ",Point," Multiplier = ",Multiplier); }
EURJPY.... let us know what prints you have with this code
I'm sorry cause' I'm dumb enough to not understand the answer .
What I don't understand is, I already have 2 if for 3 and 5 point to change it to 0.01 and 0.0001 .
Why do you all said the last if does not == 0.00001, and why does multiplier change to 0.001 ? It should be 0.0001 if point is not equal to 0.00001 .
Does this make sense to you?
x=3; if (x==3) y=2; //YES x==3, so y must =2 if (x!=3) y=x; //as x=3,(x!=3)cannot be true, so y remains =2 if (x==5) y=4; //No x==3, so it certainly doesn't ==5 if (x!=5) y=x; //x=3, so (x!=5) is true, so y=3 x=3; if (x==5) y=4; //No x==3, so it certainly doesn't ==5 if (x!=5) y=x; //x=3, so (x!=5) is true, so y=3 if (x==3) y=2; //YES x==3, so y must =2 if (x!=3) y=x; //x does =3, (x!=3) is false so y stays =2
There is no way that your code worked in a previous build. It would not work in any build.
Thank you DeVries :)
You really need to read and understand this: Can price != price ? simply checking if two doubles are equal is asking for issues.
Thank you . It helps !! *Mucks!*
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The multiplier is to calculate the SL and TP for 2 to 5 digits broker . The 4 and 5 digits works fine, however the problem lies with the 3 digits broker .
EJ at buy ( or sell ) 140.540, SL and TP for 30 pips should be 140.240 and 140.840 . Should works fine with the 2nd if after initialize . However it shows 140.510 for SL and 140.570 for TP .
If the point == 0.00001 is at the 2nd place instead of the last, the 3 digits works perfectly fine and the problems changes to 4 and 5 digits ....
Doesn't have problem at older build though .