Trade at the beggining of each candle
-
Hi all,
I am trying to open buy and sell positions following some conditions. But I would like one important thing: when a trade open it is only at the beggining of a candle, not in the middle. Example, I am on H1 timeframe, I want to open a trade at 11:00pm, not at 10:46pm.
Thanks for your help!
-
If your conditions allow, try this once per minutes block and for time add this Period(), this should mean regardless of the time frame everything under happens once at candle open
-
Thanks a lot for your answer. You mean like that? Just because it doezsn't work. On H1 timeframe I have trades at 11.34pm and 12.00pm...

-
This is what I mean, I regularly use it on live/demo/backtest, and it never activates except for the exact minutes. This block activates every x minutes from midnight, Period() is the minutes from the current chart using broker time (so each candle), and only happens at the current chart candle open/close.
-
@jstap said in Trade at the beggining of each candle:
This is what I mean, I regularly use it on live/demo/backtest, and it never activates except for the exact minutes. This block activates every x minutes from midnight, Period() is the minutes from the current chart using broker time (so each candle), and only happens at the current chart candle open/close.
Hi,
Ok, so if I want to open a trade at the beggining of each hour I need to put 0? Like that "Period(0)" ?
-
No just put above placing a trade, Period() just counts the minutes from 00:00, if you want to place on a different time frame candle open then you would need to place the minutes needed
-
Ok, I understand. So for H1 TF, I can put "Period()" but for M15 TF can I put "Period(0,15,30,45)" or need I put "Period(15)" another block with "Period(30)"...?
-
The period() just returns the current chart time frame
-
Ah ok, I undertsand. So normally, in H1 TF, if I put Period() in "Once per minutes" I will have trade only every hour. In M15 TF every trade will be at beggining of each candle. Right?
-
So the period() will return the minutes of the current chart, oi on the same chart you want something to happen every 15 minute candle open, then in separate block add 15 for the minutes