Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Check the time period used - MetaTrader 5 Expert | Forex Indicators Download - MT4/MT5 Resources

author EAcpu | 5 reads | 0 comments |

This function takes two integer arrays as parameters: "allowedPeriods" and "periodsToCheck". "allowedPeriods" is an array containing all time periods allowed by the system, while "periodsToCheck" is an array containing the time periods used by the user in the indicator.

This function iterates over the elements of the "periodsToCheck" array and checks whether each element is present in the "allowedPeriods" array. If any disallowed time periods are found, the function will return "false". If all time periods are allowed, the function returns "true".

In short, this function is used to ensure that the time period used in the indicator is valid and allowed by the system.


Attachment download

📎 verifytf.mq5 (2.55 KB)

Source: MQL5 #42845

Check the time period used - MetaTrader 5 Expert | Forex indicator download - MT4/MT5 resource usage and screening recommendations

This content can be used as a data entry for foreign exchange EA, indicators, trading systems or quantitative strategies. When reading, it is recommended to make a judgment based on the platform version, trading type, time period, risk control method and historical discussion background. Do not use it directly based on the title or a single point of view.

If the content involves MT4/MT5, ForexFactory, MQL source code, TradingView indicators or strategy discussions, you can give priority to the parameter logic, backtest environment, market stage, execution cost and failure conditions, and then decide whether to continue downloading, reviewing or secondary development.

Risk warning

For any EA, indicator or automatic trading strategy, it is recommended to first conduct historical backtesting, simulation account verification and small capital testing. Grid, Martin, high frequency, recovery and examination strategies especially require setting the account risk upper limit, single variety risk upper limit and manual deactivation conditions.

Verification code Refresh