Download MetaTrader 5
To add comments, please log in or register
Publish your application in Cobe Base. Millions of traders will see it!
Gerardo Bustos
747
Gerardo Bustos 2015.03.22 23:19 

Hello forum, good day.

Is it possible to know when the bar ends and place an order right at the last tick? I know that the easy way would be to wait until new bar event and do it on first tick, but I need to place the order right at the last tick/end of a bar. Could this be done?

Best regards and thank you,

codeMolecules 

Keith Watford
Moderator
7960
Keith Watford 2015.03.22 23:47  
There is no way of knowing whether a tick will be the last tick of the bar
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2015.03.23 00:02  
GumRai:
There is no way of knowing whether a tick will be the last tick of the bar
But you would know when the current bar will reach its time before new bar developed.
Gerardo Bustos
747
Gerardo Bustos 2015.03.23 00:32  
deysmacro:
But you would know when the current bar will reach its time before new bar developed.

Hello deysmacro, thanks for your response. 

So this could be almost the same as knowing when the last tick of a bar is and then place an order just before new bar, correct? How could this be done?

Your help will be much appreciated. 


Best regards and thank you,

codeMolecules 

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2015.03.23 00:37  
codeMolecules:

So this could be almost the same as knowing when the last tick of a bar is and then place an order just before new bar, correct?

Sorry. Not the same. Every bar developed in a preset timing. So, get the timing and open new order in the last few seconds of the current bar.
whroeder1
13627
whroeder1 2015.03.23 12:27  
deysmacro: . So, get the timing and open new order in the last few seconds of the current bar.
And what if there is no tick in the last few seconds of the bar. During Asian session there can be many minutes between ticks
Miguel
29
Miguel 2015.03.23 12:49  

It is not possible to check whether a tick is the last in a bar or not, but if you are using long timeframes like H1 or more, you could check for the last M1 bar for each H1 bar. I know this is not the last tick, but could be a workaround.

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2015.03.23 13:20  
WHRoeder:
deysmacro: . So, get the timing and open new order in the last few seconds of the current bar.
And what if there is no tick in the last few seconds of the bar. During Asian session there can be many minutes between ticks

I know the workaround. No need to depend on ticks.
/
To add comments, please log in or register