Hello there mql experts I am newbie please explain me I have questions

 

New bar function is it necessary to use new bar function when implement buy or sell order or not

if i have coded price filter function should i use new bar function inside price filter


bool NewBarB(int TF=0)

  {

   static datetime NewTime=0;

   if(NewTime!=iTime(Symbol(),TF,0))

     {

      NewTime=iTime(Symbol(),TF,0);

      return(true);

     }

   return(false);

  }

if(NewBarB())

      { 

//Orders

}



////Price filter

if(NewBarB())

      { 

Close_Order_By_IFORCE();

}

Please help me to create my ea.

Best regards Suleyman

 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button


Reason: