Lock EA to Specific Timeframe
Requesting a feature to lock the EA to a specific timeframe, if EA is to be loaded on a 15 min timeframe it should generate a warning message if another timeframe is chosen and should not be able to open trades.
You can do it by calling Custom Function: Period(), for example:
IF Period() 15
THEN LogToJournal(“Incorrect period”)
Period returns currenttimeframe in minutes, so it will return 5 for M5, 15 for m15, 60 for H1, 240 for H4, 1440 for D1 and so on.
Viewing 2 posts - 1 through 2 (of 2 total)