Code will nopt trigger on live mode - page 2

 
Keith Watford:
bool closeBuy1 = (!ema3over5  || (ema3open < ema5open));

if ema3over5 is false, closeBuy1  is true

That is what he wants.
 

whroeder1:               

Keith Watford:
bool closeBuy1 = (!ema3over5  || (ema3open < ema5open));

if ema3over5 is false, closeBuy1  is true

That is what he wants.


Then I have misunderstood something as that makes no sense to me at all.

Why would he want to close all orders if the input bool  ema3over5 is false?

 
Keith Watford: Why would he want to close all orders if the input bool  ema3over5 is false?

If ema3over5 is false, then that condition is irrelevant. He wants to close when all conditions are true. Irrelevant is true.
 
whroeder1:

If ema3over5 is false, then that condition is irrelevant. He wants to close when all conditions are true. Irrelevant is true.
Keith Watford:               
bool closeBuy1 = (!ema3over5  || (ema3open < ema5open));

if ema3over5 is false, closeBuy1  is true

try

bool closeBuy1 = (ema3over5  && (ema3open > ema5open));

If closeBuy1 is true, then

  bool closeBuyOrders = (closeBuy1 || closeBuy2 || closeBuy3 || closeBuy4);
closeBuyOrders will be true, so the condition is not irrelevant
Reason: