question about order opening price

 

Hello traders,

I want to make my EA open a position only at the hour bar close price, after the condition has been met. Not immediately the next tick after the condition is met.

I have tried using iClose(EURUSD, PERIOD_H1, 0) in place of Bid and Ask in OrderSend but it still opens the position in the immediate tick following the condition fullfillment.

Can anyone here please guide me?

 
sentinelx:

Hello traders,

I want to make my EA open a position only at the hour bar close price, after the condition has been met. Not immediately the next tick after the condition is met.

I have tried using iClose(EURUSD, PERIOD_H1, 0) in place of Bid and Ask in OrderSend but it still opens the position in the immediate tick following the condition fullfillment.

Can anyone here please guide me?

The current bar Close price is Bid.
 
RaptorUK:
The current bar Close price is Bid.


Thank you for your reply RaptorUK,

I have used Bid price as well. When i check the opening price in the chart, it is not the hour bar closing price that the order is opened at. Instead it is at a place where the condition first fullfilled, the immediate tick after that.

I want the order to wait after the condition fullfillment, for the hour bar to close and then open the position at the hour bar close price. How can i do that.

I hope i am conveying it right.

 
sentinelx:

I want the order to wait after the condition fullfillment, for the hour bar to close and then open the position at the hour bar close price. How can i do that.

I hope i am conveying it right.

You can't do that . . . you have no way of knowing which tick will be the last tick of the current H1 bar. The very best you can do is use the very first tick of the next bar.
 
RaptorUK:
You can't do that . . . you have no way of knowing which tick will be the last tick of the current H1 bar. The very best you can do is use the very first tick of the next bar.

Okay, thanks for letting me know its impossible. I better move on with learning what is possible :)
 

yes because under normal circumstances there will only be 1 pip difference. (not including weekend gaps)

Reason: