Add/Remove a function from input

 

Hi,
I have a simple if condition, if true then send order. The condition consists of multiple &&'s.

is it possible to enable disable one &&(Condition) from input panel?


 if (((ifBull>50 && diff1<20)||(ifBull>80 && diff1<30)||(ifBull>30 && diff1<6)) && total<1&&Ask-50>MovingAverage && Spread<AllowedSpread && CurrentBar!=LastOrderOpenBar )
      {int orderTicket=OrderSend(NULL,OP_BUY,2,Ask,5000,Ask-50,Ask+120,"Buy_Trailing Stop",MagicNumber);}

 I actually want to enable/disable that "&& CurrentBar!=LastOrderOpenBar" part of the code.

Thanks in advance!

 
MD Hafijul:

Hi,
I have a simple if condition, if true then send order. The condition consists of multiple &&'s.

is it possible to enable disable one &&(Condition) from input panel?


 I actually want to enable/disable that "&& CurrentBar!=LastOrderOpenBar" part of the code.

Thanks in advance!

input   BarCheck = true;

if ( ((Bull>50 && diff1<20)||(Bull>80 && diff1<30)||(Bull>30 && diff1 <6)) && total <1 && Ask -50 > MovingAverage && Spread < AllowedSpread)
   if((BarCheck == true && CurrentBar != LastOrderOpenBar) || BarCheck == false)
      int orderTicket = OrderSend(NULL,OP_BUY,2,Ask,5000,Ask-50,Ask+120,"Buy_Trailing Stop",MagicNumber);

I have removed your erroneous IFs as well
 
Paul Anscombe:
I have removed your erroneous IFs as well

Hahaha, Thank you very much!