Up and Down Indicator Indicator For MT5
Die Up and Down Indicator Indicator For MT5 Abwärtsanzeige Up and Down Indicator Indicator For MT5 zeigt die Stärke der Aufwärts- und Abwärtsbewegung an. Die Höhe der Histogrammwerte wächst und schrumpft entsprechend der Volatilität der Bewegungen. Bei Aufwärtsbewegungen werden die Werte positiv und das Histogramm ist grün. Bei Abwärtsbewegungen ist die Farbe rot und die Werte werden negativ.
Installation des Up and Down Indicator Indicator For MT5
Nachdem Sie den Indikator über das obige Formular heruntergeladen haben, müssen Sie die Zip-Datei entpacken. Anschließend müssen Sie die Datei k_iupdown.mq5 in den Ordner MQL5Indicators Ihrer MT5 Installation kopieren. Starten Sie danach MT5 neu und Sie können den Indikator in der Liste der Indikatoren sehen.
Parameter des Up and Down Indicator Indicator For MT5
Der Up and Down Indicator Indicator For MT5 verfügt über 2 zu konfigurierende Parameter.
input string comment="Index from 1-10 to increase sensitivity.";
input int tick_volume_index=7;
Puffer des Up and Down Indicator Indicator For MT5
Der Up and Down Indicator Indicator For MT5 stellt 5 Puffer bereit.
SetIndexBuffer(0,ExtOpenBuffer,INDICATOR_DATA);
SetIndexBuffer(1,ExtHighBuffer,INDICATOR_DATA);
SetIndexBuffer(2,ExtLowBuffer,INDICATOR_DATA);
SetIndexBuffer(3,ExtCloseBuffer,INDICATOR_DATA);
SetIndexBuffer(4,ExtColorsBuffer,INDICATOR_COLOR_INDEX);
Hauptteile des Codes
int OnCalculate(const int rates_total, // size of input timeseries
const int prev_calculated, // bars handled in previous call
const datetime& time[], // Time
const double& open[], // Open
const double& high[], // High
const double& low[], // Low
const double& close[], // Close
const long& tick_volume[], // Tick Volume
const long& volume[], // Real Volume
const int& spread[]) // Spread
{
int i=0;
bool vol_up=true;
passNo++;
if(i lt prev_calculated) i=prev_calculated-1;
while(i lt rates_total)
{
if(i!=0)//Do not count the first bar.
{
total_vol+=tick_volume[i];
count_bars++;
}
double x=0;
if(count_bars==0)
{
x=tick_volume[i]*100.0/tick_volume_index;
}
else
{
double avg_vol=1.0*total_vol/count_bars;
x=tick_volume[i]*100.0/(avg_vol*tick_volume_index);//Get %
}
int col=0;
if(x gt 0)col=0;
if(x gt 25)col=1;
if(x gt 50)col=2;
if(x gt 75)col=3;
if(open[i] lt close[i])//UP
{
ExtColorsBuffer[i]=col;
}
else//DOWN
{
ExtColorsBuffer[i]=4+col;
}
ExtOpenBuffer[i]=0;//open[i];
ExtHighBuffer[i]=high[i]-open[i];
ExtLowBuffer[i]=low[i]-open[i];
ExtCloseBuffer[i]=close[i]-open[i];
i++;
}
return(rates_total);
}
//+------------------------------------------------------------------+