How to specify to EA not to open new trades after London close
Results 1 to 3 of 3

Thread: How to specify to EA not to open new trades after London close

  1. #1
    Men I need to put to my EA to not start new order after London close, start trading just after London opens. Also if it's likely to set a profit target for a day when EA reaches too to not open another order until London reopens

    Thanks in advance whoever assists.

  2. #2
    Quote Originally Posted by ;
    Guys I have to set to my EA not to open new order after London close, begin trading just after London unlocks
    One method is to have a bool function to check if the period is between London open and London close.

    Create some input factors so it's possible to alter the London hours as required:
    Inserted Code enter LonOpen=8; // London Open (broker time) enter LonClose=17; // London Close (broker time)
    Add the job:
    Inserted Code bool London() if(Hour()gt;=LonOpen Hour()lt;LonClose) return(true); return(false);
    Before launching an order, simply check the return value of London()
    Inserted Code if(London()... ) {
    Quote Originally Posted by ;
    Additionally if it's possible to set a profit target to get a day when EA reaches also not to open any other order until London reopens
    This depends on what you mean with per day. Do you mean that a 24 hour interval, or profit produced between London open and London near?
    How do you want to take care of orders that were opened after London open but did not shut until after London shut (or maybe even after the next London open)?
    Can it be time the order started or the period the order closed that is significant to you?

  3. #3
    [quote=honestknave;7939310]quote One method is to have a bool function to check whether the time is between London open and London close. Create some input variables so it's possible to alter the London hours as required: enter LonOpen=8; // London Open (broker time) enter LonClose=17; // London Close (broker time) Now add the function: bool London() if(Hour()gt;=LonOpen Hour()lt;LonClose) return(true); return(false); Before opening an order, simply check the return value of London() if(London()... ) { quote This is dependent on what you mean with a day. Do you mean a 24 hour period, or profit produced between London open and London near? How can you wish to deal with orders which were opened after London open but did not shut until after London shut (or perhaps even after the next London open)? Can it be time that the order started or the time the order closed which is significant to youpersonally? [/quote

    I need EA not to start orders some hours until London closes rather flexible.

    The remainder orders will stay open until TP is hit as it's based on martingale. Now if this usually do not occurs until next London open it will keep on opening new actions.

    Let us say I start an order two weeks until London close then EA open orders till TP is hit even if it requires a few days. I only wish to prevent EA to start orders lets say one hour prior to London closes and allow it to operate for all the evening.
    Also I would like to add to EA if profit reaches xx usd level then not to start orders until next London opening.

    Hope you have the idea. Thanks for help mate.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information