Lock EA to Specific Timeframe
1 replies
ramacan
10 years ago #111243
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.
Regards.
Mark Fric
10 years ago #121820
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.
Mark
StrategyQuant architect
Viewing 1 replies (of 1 total)