Dollar Index Indicator For MT5
Table Of Contents:
- Dollar Index Indicator For MT5
- Установка Dollar Index Indicator For MT5
- Параметры Dollar Index Indicator For MT5
- Буферы Dollar Index Indicator For MT5
- Основные части кодекса
Dollar Index Indicator For MT5 рассчитывает индекс, который также называется USDX, DXY и DX. Он рассчитывается на основе взвешенного значения различных валютных пар. Этими валютными парами являются: 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
Буферы Dollar Index Indicator For MT5
Dollar Index Indicator For MT5 предоставляет буферы 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); }