why do I get this error although I have an operator in my code?

why do I get this error although I have an operator in my code?

Manage alerts

Loading saved threads...

Areej · External communityPost link
External question — Stack Overflow Stack Exchange Author: Areej Original post: https://stackoverflow.com/questions/73182828 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. In MQL4, I have the following line int OP_TYPE = int(0.5((1+f)*OP_BUY+(1-f)*OP_SELL)); which gives the error: '+' - some operator expected . What am I supposed to do in this case?
Quote
Report
PaulB · External communityPost link
External answer — Stack Overflow Stack Exchange Author: PaulB Original post: https://stackoverflow.com/a/73209812 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. You cannot infer calc types using MQL4, make sure you explicitly type your calculation in full. int OP_TYPE = int(0.5*((1+f)*OP_BUY+(1-f)*OP_SELL));
Quote
Report

Post Reply

Checking account access…