Please use the SRC button when posting code. I've fixed it for you this time.
You need to check the result of all of your OrderModify() operations. It's a boolean and needs to be checked just like you have done with the OrderSend() operations. It's not an error, just a warning, but should be fixed or it can lead to unexpected results.
There's an example you can follow in the documentation
You need to check the result of all of your OrderModify() operations. It's a boolean and needs to be checked just like you have done with the OrderSend() operations. It's not an error, just a warning, but should be fixed or it can lead to unexpected results.
There's an example you can follow in the documentation
Filter:
Please use the SRC button when posting code. I've fixed it for you this time.
You need to check the result of all of your OrderModify() operations. It's a boolean and needs to be checked just like you have done with the OrderSend() operations. It's not an error, just a warning, but should be fixed or it can lead to unexpected results.
There's an example you can follow in the documentation
But it do not compile?
Please use the SRC button when posting code. I've fixed it for you this time.
You need to check the result of all of your OrderModify() operations. It's a boolean and needs to be checked just like you have done with the OrderSend() operations. It's not an error, just a warning, but should be fixed or it can lead to unexpected results.
There's an example you can follow in the documentation
awanje786:
But it do not compile?
I just downloaded your code and it compiles just fine for me. As I said above, all you are seeing when you compile are warnings, not errors. Warnings do not stop your code compiling
But it do not compile?
OrderModify() returns boolean and the compiler expects the program to check/get the value. Getting the value of the function should remove the warning, e.g.:
OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green);}
to:
bool res = OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green);
or:
if (!OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green)) Print(GetLastError());
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
Please Suggest me correction. I am getting error "Return Value Should Be Checked "