Chaikin Oscillator CHO Indicator For MT5
Table Of Contents:
- Chaikin Oscillator CHO Indicator For MT5
- Installation du Chaikin Oscillator CHO Indicator For MT5
- Paramètres du Chaikin Oscillator CHO Indicator For MT5
- Tampons du Chaikin Oscillator CHO Indicator For MT5
- Parties principales du code
L' Chaikin Oscillator CHO Indicator For MT5 est basé sur l'indicateur Distribution d'accumulation et la moyenne mobile exponentielle. L'algorithme EMA est appliqué aux valeurs de l'indicateur AD. Pour calculer la valeur de l'oscillateur Chaikin, l'EMA avec la période 3 et l'EMA avec la période 10 de l'indicateur AD sont calculés. La différence entre l'EMA (3) et l'EMA (10) correspond à la valeur dessinée sur l'histogramme. Etant donné que le volume fait partie de l'indicateur AD, l'oscillateur Chaikin tire ses valeurs du volume et peut donc être un indicateur avancé.
Installation du Chaikin Oscillator CHO Indicator For MT5
Après avoir téléchargé l'indicateur via le formulaire ci-dessus, vous devez décompresser le fichier zip. Ensuite, vous devez copier le fichier cho.mq5 dans le dossier MQL5Indicators de votre installation MT5 . Ensuite, redémarrez MT5 et vous pourrez voir l’indicateur dans la liste des indicateurs.
Paramètres du Chaikin Oscillator CHO Indicator For MT5
Chaikin Oscillator CHO Indicator For MT5 a des paramètres 4 à configurer.
input int InpFastMA=3; // Fast MA period input int InpSlowMA=10; // Slow MA period input ENUM_MA_METHOD InpSmoothMethod=MODE_EMA; // MA method input ENUM_APPLIED_VOLUME InpVolumeType=VOLUME_TICK; // Volumes
Tampons du Chaikin Oscillator CHO Indicator For MT5
Le Chaikin Oscillator CHO Indicator For MT5 4 Chaikin Oscillator CHO Indicator For MT5 fournit des tampons 4 .
SetIndexBuffer(0,ExtCHOBuffer,INDICATOR_DATA); SetIndexBuffer(1,ExtFastEMABuffer,INDICATOR_CALCULATIONS); SetIndexBuffer(2,ExtSlowEMABuffer,INDICATOR_CALCULATIONS); SetIndexBuffer(3,ExtADBuffer,INDICATOR_CALCULATIONS);
Parties principales du code
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 &TickVolume[], const long &Volume[], const int &Spread[]) { int i,limit; //--- check for rates total if(rates_total lt InpSlowMA) return(0); // not enough bars for calculation //--- preliminary calculations if(prev_calculated lt 1) { limit=1; //--- first values if(InpVolumeType==VOLUME_TICK) ExtADBuffer[0]=AD(High[0],Low[0],Close[0],TickVolume[0]); else ExtADBuffer[0]=AD(High[0],Low[0],Close[0],Volume[0]); ExtSlowEMABuffer[0]=ExtADBuffer[0]; ExtFastEMABuffer[0]=ExtADBuffer[0]; } else limit=prev_calculated-1; //--- calculate AD buffer if(InpVolumeType==VOLUME_TICK) { for(i=limit;i lt rates_total && !IsStopped();i++) ExtADBuffer[i]=ExtADBuffer[i-1]+AD(High[i],Low[i],Close[i],TickVolume[i]); } else { for(i=limit;i lt rates_total && !IsStopped();i++) ExtADBuffer[i]=ExtADBuffer[i-1]+AD(High[i],Low[i],Close[i],Volume[i]); } //--- calculate EMA on array ExtADBuffer AverageOnArray(InpSmoothMethod,rates_total,prev_calculated,0,InpSlowMA,ExtADBuffer,ExtSlowEMABuffer,weightslow); AverageOnArray(InpSmoothMethod,rates_total,prev_calculated,0,InpFastMA,ExtADBuffer,ExtFastEMABuffer,weightfast); //--- calculate chaikin oscillator for(i=limit;i lt rates_total && !IsStopped();i++) ExtCHOBuffer[i]=ExtFastEMABuffer[i]-ExtSlowEMABuffer[i]; //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+