EA should not open trades at certain times
-
Hello;
I want my expert robot not to work between 23:00 and 01:00. how can I do it?
Thank you. -
@dragonfly617 Define what you mean by "not to work". I assume you mean it SHOULD NOT open new trades, but SHOULD care about open trades. Is that correct?
-
Yes;
the transaction will not open.
open trades will remain.
sorry for bad english. -
@dragonfly617 Like this

I also set my variable vsNewTradesEnabled to "False" or "True" in order to dosplay this information in a comment block. But that is optional.
Furthermore I addes a Weekday block which is also optional for the requested functionality. -

Which blog should I link to this?
-
Can you please share your project? I guess that 'Hours filter' block could do the job if it was above blocks 2 and 6, but without knowing what's inside, I'm not sure.
-
@dragonfly617 There ar 2 option from your screenshot.
Option 1) Put a Pass block in front of both No trade blocks and connect them with it. Pass - > No trade (each). Put the block ID of the Pass block in the Turn Off / Turn On blocks.
Option 2) Put the block id numbers of both No Trade blocks in the Turn Off / Turn On blocks. Do this as a comma seperated list! In your case from screenshot 1,5