Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Twitter !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Experts

Check the time periods used - expert pour MetaTrader 5

Vues:
2979
Note:
(9)
Publié:
2023.02.15 00:21
Mise à jour:
2023.02.15 00:22
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

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


The function iterates through the elements of the "periodsToCheck" array and checks if each of them is present in the "allowedPeriods" array. If it finds any time period that is not allowed, the function returns "false". If all time periods are allowed, the function returns "true".


In short, this function is used to make sure that the time periods used in an indicator are valid and allowed by the system.

    CLS (ClearScreen) CLS (ClearScreen)

    CLS (ClearScreen) delets all object drawn on the chart with key press "C"

    Advanced Line Chart Advanced Line Chart

    Advanced Line Chart based on Japanese candlesticks.

    Hurst Exponent - optimized version Hurst Exponent - optimized version

    Hurst Exponent - optimized version

    Current Relative Drawdown Current Relative Drawdown

    The DD_Relative function calculates the drawdown (relative loss) of the current trading account in percentage. To do this, it uses the Current_LossOrProfit() function to get the current profit or loss for all open positions and divides it by the current account balance. The result is rounded to two decimal places and displayed in the chart comment. The Current_LossOrProfit() function loops through all open positions in the account and adds the commission, swap, and current profit or loss for each position. The result is rounded to two decimal places and returned as the current profit or loss of all open positions.