Guarda come scaricare robot di trading gratuitamente
Ci trovi su Twitter!
Unisciti alla nostra fan page
Script interessante?
Pubblica il link!
lasciare che altri lo valutino
Ti è piaciuto lo script? Provalo nel Terminale MetaTrader 5
Indicatori

Hurst Exponent - optimized version - indicatore per MetaTrader 5

Visualizzazioni:
7928
Valutazioni:
(13)
Pubblicato:
2023.02.16 11:59
Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance

Optimized version of the indicator originally published here : Hurst exponent . 


Recommendations:
  • Please read the original description for details
  • the code can be further optimized (by using faster logarithm approximation - that would cause some precision loss - for example and some other code changes), but the gains would not be as "dramatical" as this version is compared to the first version


Check the time periods used Check the time periods used

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"

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.

Get Position commission OrderCommission (mt4 term) of an active position in MT5 Get Position commission OrderCommission (mt4 term) of an active position in MT5

Get commission of an active position in mt5 , its easy to use function.