Download MetaTrader 5

looking to open a trade based on new bar instead of tick value

To add comments, please log in or register
Eric Lebouthillier
201
Eric Lebouthillier  

Hi,

 First , i m not a coder but i can read so much coding. I have an EA with fires a trade based on OnTick() "i think" but would like to get that confirmation based on closing /opening bar please , can someone help , thanks !!

  void OnTick()

  {

//----

   manage_trades();

      if (count==0)

     {

      double line=iCustom(NULL,0,"3c_Turbo_JRSX_Filtered",JRSX_Len,JRSX_Filter,0,0); 

      if (jrsx()=="Up" && line<=JRSX_BuyThreshold) opentrade(0);

      else if (jrsx()=="Dn" && line>=JRSX_SellThreshold) opentrade(1);

     }

//----

  }  

whroeder1
15582
whroeder1  
lebric: based on closing /opening bar please
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. use this
To add comments, please log in or register