Error

 

Hi 

I had the following line 

int OP_TYPE = int(0.5((1+f)*OP_BUY+(1-f)*OP_SELL));

and it gave me the error: " '+' - some operator expected"


what am I supposed to do in this case? 

 
areejyousefhussein: I had the following line 
int OP_TYPE = int(0.5((1+f)*OP_BUY+(1-f)*OP_SELL)); 

and it gave me the error: " '+' - some operator expected". what am I supposed to do in this case? 

There is a missing operator after the 0.5 ...

int OP_TYPE = int( 0.5 ??? ( ( 1 + f ) * OP_BUY + ( 1 - f ) * OP_SELL ) );

And please use the "</>" icon or Alt-S when adding code to your post.

 
Fernando Carreiro #:

There is a missing operator after the 0.5 ...

And please use the "</>" icon or Alt-S when adding code to your post.

thanks a lot it worked.