Dollar Index Indicator For MT5
Table Of Contents:
- Dollar Index Indicator For MT5
- Εγκατάσταση του Dollar Index Indicator For MT5
- Παράμετροι του Dollar Index Indicator For MT5
- Buffers του Dollar Index Indicator For MT5
- Κύρια μέρη του κώδικα
Ο Dollar Index Indicator For MT5 υπολογίζει το δείκτη που ονομάζεται επίσης USDX, DXY και DX. Υπολογίζεται βάσει σταθμισμένης τιμής διαφορετικών forexpairs. Αυτά τα forexpairs είναι: EURUSD, USDJPY, GBPUSD, USDCAD, USDSEK και USDCHF
Εγκατάσταση του Dollar Index Indicator For MT5
Αφού κατεβάσετε την ένδειξη μέσω της παραπάνω φόρμας, πρέπει να αποσυνδέσετε το αρχείο zip. Στη συνέχεια, πρέπει να αντιγράψετε το αρχείο Dollar index.mq5 στο φάκελο MQL5Indicators της εγκατάστασης MT5 . Στη συνέχεια, κάντε επανεκκίνηση του MT5 και, στη συνέχεια, θα μπορείτε να δείτε τον δείκτη στη λίστα των δεικτών.
Παράμετροι του Dollar Index Indicator For MT5
Το Dollar Index Indicator For MT5 έχει παραμέτρους 3 για να ρυθμίσετε τις παραμέτρους.
input int inpBarsToCalculate = 500; // Bars to calculate input string inpSymbolsPrefix = ""; // Symbols prefix input string inpSymbolsSuffix = ""; // Symbols suffix
Buffers του Dollar Index Indicator For MT5
Το Dollar Index Indicator For MT5 παρέχει buffers 2 .
SetIndexBuffer(0,ic); SetIndexBuffer(1,icolor,INDICATOR_COLOR_INDEX);
Κύρια μέρη του κώδικα
int OnCalculate (const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[] ) { int _bars = (int)MathMax(inpBarsToCalculate,ChartGetInteger(0,CHART_VISIBLE_BARS)); int i=(int)MathMax(prev_calculated-_bars+1,0); for (; i lt rates_total && !_StopFlag; i++) { if (i lt rates_total-_bars) { ic[i] = EMPTY_VALUE; icolor[i] = 0; continue; } double dxyClose = 50.14348112; for (int k=0; k lt 6; k++) { MqlRates _rates[]; int _ratesCopied = CopyRates(symbols[k],0,time[i],1,_rates); if (_ratesCopied == 1) dxyClose *= MathPow(_rates[0].close,pows[k]); } ic[i] = dxyClose; icolor[i] = (i gt 0) ? (ic[i] gt ic[i-1]) ? 1 : (ic[i] lt ic[i-1]) ? 2 : 0 : 0; } return(rates_total); }