# Why this code gives operator precedence error?

108

if(NormalizeDouble(price_140-Move_step*pm*Point,Digits)>NewPrice
&& NewPrice<=NormalizeDouble(price_116-Distance_between_orders*pm*Point,Digits)
|| price_116==0.0
|| NewPrice>=NormalizeDouble(price_108+Distance_between_orders*pm*Point,Digits)
|| NewPrice<=NormalizeDouble(price_116-Distance_between_orders*pm*Point,Digits))
1851

rod777:
if(NormalizeDouble(price_140-Move_step*pm*Point,Digits)>NewPrice
&& NewPrice<=NormalizeDouble(price_116-Distance_between_orders*pm*Point,Digits)
|| price_116==0.0
|| NewPrice>=NormalizeDouble(price_108+Distance_between_orders*pm*Point,Digits)
|| NewPrice<=NormalizeDouble(price_116-Distance_between_orders*pm*Point,Digits))

You're missing a set of parenthesis. I can't tell you where because it's your logic so you need to determine the correct precedence.

17949

rod777:
` if(A && B || C || D && E || F || G)`
Don't mix ands and ors together. Add parentheses to make it specific.
```bool A = NormalizeDouble(price_140-Move_step*pm*Point,Digits)>NewPrice;
bool B = NewPrice<=NormalizeDouble(price_116-Distance_between_orders*pm*Point,Digits);
bool C = price_116==0.0;
bool D = Open_order_on_trend;