Hi,
Try to normalize price values.
For example, Position Management Module 7.6 of AIS2 Trading Robot is totally free of these messages.
Exactly, lines 491 and 494 prevent from the order modification message 1:
...
//< 7.6.3. Order Modify Trading Function 28 > //< 490>
if ( avd.Stop > 0 ) //< 491>
{ int ali.TrailPoints = MathRound ( MathAbs ( OrderStopLoss () - avd.Stop ) //< 492>
/ avd.QuotePoint ) ; //< 493>
if ( ali.TrailPoints >= MarketInfo ( aes.Symbol , MODE_FREEZELEVEL ) ) //< 494>
{ //< 495>
//< Trading Function Execution Sequence > //< 496>
//< Step 1 > //< 497>
...
Thanks to Gordon.
Best regards
sunshineh:
Hi,
I want to change the TakeProfit of an existing order.
But I am getting always the "OrderModify error 1"
Here is a part of my code:
It works, but how can I prevent the error-message?This error might also happen if your OrderModify() is attempting to change s/l or t/p with the same value they already have. So make sure that can't happen in your GlobalVariableGet() method of setting s/l and t/p.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I want to change the TakeProfit of an existing order.
But I am getting always the "OrderModify error 1"
Here is a part of my code:
It works, but how can I prevent the error-message?