[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 484
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
Incorrect parameters have been sent to the trade function, e.g. incorrect symbol, unidentified trade, negative price tolerance, non-existing ticket number, etc. You need to change the program logic.
Try the second parameter to put OrderOpenPrice() instead of zero
get in the habit of printing any parameters that may be relevant to the error.
if (!OrderModify(...)) { Print(GetlastError()+.... OrderModify parameter list ); }
Yes, it's a good habit. Thank you.))
FOReignEXchange 03.07.2011 18:35
Try the second parameter instead of zero to put OrderOpenPrice()
Yes, that's right. )) And for some reason I was convinced that you can't set parameters that you don't need to modify, as that will lead to another error. Is there something similar to what I'm talking about?
Something like this is fixed in my mind:
The function tries to change the parameter to the same value.
And for some reason I was convinced that you can't set parameters that you don't want to modify, as that would cause another error. Is there something similar to what I'm talking about?
Something like this is fixed in the head:
The function tries to change the parameter to the same value.
You could change just one parameter and leave the rest unchanged and write OrderOpenPrice(), OrdsrStopLoss() etc. everywhere.
Here's another question I have. On the code example I gave above (tol64 03.07.2011 18:20).
The program does not always synchronize the stop loss of different positions. That is, the position is selected, the condition is fulfilled, it is also recorded in the journal, but the stop loss is not modified.
In the picture above stop loss for position with ticket 4 should be modified and set to the same value as for position with ticket 1. The program reaches this point with the print, but further execution seems to be blocked.
Because the variant, in which the condition is not fulfilled, is not logged either. Tried so many different combinations, but none of them worked. Please help.
And here.
Isn't that the way to do it?
And here.
Isn't that the way to do it?
No, it doesn't. It returns a bool anyway.
Here's another question I have. On the code example I gave above (tol64 03.07.2011 18:20).
The program does not always synchronize the stop loss of different positions. That is, the position is selected, the condition is fulfilled, it is also recorded in the journal, but the stop loss is not modified.
In the picture above stop loss for position with ticket 4 should be modified and set to the same value as for position with ticket 1. The program reaches this point with the print, but further execution seems to be blocked.
Because the variant, in which the condition is not fulfilled, is not logged either. Tried so many different combinations, but none of them worked. I would like your help.
Print() to output the value of variable global_trailing_SP directly in the function you provide.
Where do you read the value of this variable?
And replace zero (highlighted) in the code
To OrderTakeProfit()
What is this condition for then, if there is no condition? And the order data are then not used.
Then tell me which code is better
write it down as:
then and tell me what the better code is
write it down as:
I don't understand? I'm just looking in the help, there OrderSelect() uses a condition. I haven't seen anywhere without true.
If is a condition operator. And there should be a condition in brackets. It seems more logical to me this way. Although there may be no difference.