melon2112 Posted June 29, 2011 Report Share Posted June 29, 2011 I am trying to see how to write a script (or use 1 already out there) for the days I am away. What I am looking for is a script that will put an OrderSend() at a specific time. I have already written the script to do the specific trade...just looking to put the order in the night before and not let it execute until a specific time the following day. Is there a way to do it using either my computer time (or preferably the online broker time) or would I have to use like a delay feature? If anyone has a suggestion, it would be greatly appreciated. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
soundfx Posted June 29, 2011 Report Share Posted June 29, 2011 Hi melon2112, It's pointless placing a pending order which you then want to execute at a particular time the next day, because pending orders will always be triggered at their entry price. You're better off creating an EA which uses iTime() to select the appropriate time to place your trades. I assume that your entry criteria is determined on the previous day, though can't this be read in the next day by looking back in history? If so, then you just need an EA to enter market orders the next day based on your entry signals which uses iTime() to ensure that the orders are entered at the time you need. If your entry criteria is determined on the previous day however it cannot be easily determined in the day when you want to enter the trade, then you may need to store the relevant variables as GlobalVariables (which are stored on the hard disk), so that they can be brought back into the EA at the right time. Without knowing exactly what you're trying to do, it's hard to give a full solution. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.