Reply

Lock EA to Specific Timeframe

1 replies

ramacan

Subscriber, bbp_participant, community, 72 replies.

Visit profile

8 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.

 

0

Mark Fric

Administrator, sq-ultimate, 3 replies.

Visit profile

8 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

0

Viewing 2 posts - 1 through 2 (of 2 total)