Send order at closure of the candle

To add comments, please log in or register
Trader1529
277
Trader1529  
count();
      if(condition01==1)
         {
         tick=OrderSend(Symbol(),OP_BUY,lot,Ask,5,0,0,"condition1",magic,0,clrGreen);
         time1=Time[0];
         }

Good morning,

I'm writing an Expert Advisor, but I need to send the order at the closure of the candle and not immediately when the condition meet. There is a  function to do it? Or how I can write it? Can someone please help me? What I wrote it sends the order immediately, but how can I modify it to send it at the closure of the candle?


Keith Watford
Moderator
18436
Keith Watford  
Trader1529:

Good morning,

I'm writing an Expert Advisor, but I need to send the order at the closure of the candle and not immediately when the condition meet. There is a  function to do it? Or how I can write it? Can someone please help me? What I wrote it sends the order immediately, but how can I modify it to send it at the closure of the candle?


Do not Double post.

I have deleted your duplicate topic.

Trader1529
277
Trader1529  
Keith Watford:

Do not Double post.

I have deleted your duplicate topic.

Sorry, but I had duplicated it because no one replied on my post.

William Roeder
19843
William Roeder  
Trader1529: order at the closure of the candle and not immediately when the condition meet.
For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart,) volume is unreliable (miss ticks,) Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.
I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
          New candle - MQL4 programming forum
Trader1529
277
Trader1529  
William Roeder:
For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart,) volume is unreliable (miss ticks,) Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.
I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
          New candle - MQL4 programming forum

Thank you

To add comments, please log in or register