Problem with an OP_BUYSTOP
Good morning, I have a problem opening a OP_BUYSTOP order, I've tried almost everything ... I looked in the forum ... but I can not find a similar problem who can help me, please ask if anyone can help. ..
I have the piece of code below happened, when I calculated the OrderSend with Price (and the result of 1.33823, I can see with the corresponding Alert ...) I get an error 4107 (Invalid Price), if I remove the comments to the previous line at OrderSend (directly Price = 1.33823) OrderSend instruction works well and opens the order ... it is very strange because Price is set to Double and do not know what can cause the error ...
Thank you, read the post at the link I posted. It will help you.
Thanks, was enough to ...
Price = NormalizeDouble(Price,Digits);
Thanks, was enough to ...
Price = NormalizeDouble(Price,Digits);
Just beware that while NormalizeDouble() may have solved your immediate issue, its use can also lead to other unintended issues.
See:
Just beware that while NormalizeDouble() may have solved your immediate issue, its use can also lead to other unintended issues.
See:
Good morning, I have a problem opening a OP_BUYSTOP order, I've tried almost everything ... I looked in the forum ... but I can not find a similar problem who can help me, please ask if anyone can help. ..
I have the piece of code below happened, when I calculated the OrderSend with Price (and the result of 1.33823, I can see with the corresponding Alert ...) I get an error 4107 (Invalid Price), if I remove the comments to the previous line at OrderSend (directly Price = 1.33823) OrderSend instruction works well and opens the order ... it is very strange because Price is set to Double and do not know what can cause the error ...