Value Chart Single Indicator For MT5
The Value Chart Single Indicator For MT5 is an advanced oscillator that shows you the direction of the trend with the help of the signal curve. When the price of a certain instrument is in the uptrend, the signal curve in the indicator will trade higher. On the contrary, when the market is in the downtrend, the signal curve will trade lower. You can also use this indicator to find the overbought and oversold condition of the market. If the reading of the signal curve is near the lower extreme point, you should be expecting a bullish reversal since the market is in the oversold region. On the contrary, when the signal curve is trading at the upper extreme point, you should be expecting a bearish reversal since the market is in the overbought region. Before you start using this tool in the real market, practice with a demo account.
Installing the Value Chart Single Indicator For MT5
After you downloaded the indicator via the form above you need to unzip the zip-file. Then you need to copy the file value_charts_single_jj.mq5 into the folder MQL5\Indicators of your MT5 installation. After that please restart MT5 and then you will be able to see the indicator in the list of indicators.
Parameters of the Value Chart Single Indicator For MT5
The Value Chart Single Indicator For MT5 has 6 parameters to configure.
input int Periode = 5;
input int Trigger = 8;
input bool Show_Arrow = true;
input int Arrow_Width = 5;
input color Arrow_Up = clrGreen;
input color Arrow_Down = clrRed;
Buffers of the Value Chart Single Indicator For MT5
The Value Chart Single Indicator For MT5 provides 4 buffers.
SetIndexBuffer(0,ExtCBuffer,INDICATOR_DATA);
SetIndexBuffer(1,ExtColorBuffer,INDICATOR_COLOR_INDEX);
SetIndexBuffer(2,RangeAverage,INDICATOR_CALCULATIONS);
SetIndexBuffer(3,MiddleAverage,INDICATOR_CALCULATIONS);
Main Parts Of The 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 bars count
if(rates_total lt DATA_LIMIT)
return(0);// not enough bars for calculation
//--- set first bar from what calculation will start
if(prev_calculated lt DATA_LIMIT)
limit=DATA_LIMIT;
else
limit=prev_calculated-1;
//--- the main loop of calculations
for(i=limit;i lt rates_total && !IsStopped();i++)
{
RangeAverage[i]=High[i]-Low[i];
_AValue=0.2*SimpleMA(i,Periode,RangeAverage);
MiddleAverage[i]=(High[i]+Low[i])/2.0;
_BValue=SimpleMA(i,Periode,MiddleAverage);
if (_AValue !=0)
ExtCBuffer[i]=((Close[i]- _BValue) / _AValue);
//--- set color for candle
}
//--- return value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+
//| Trace Arrow Function |
//+------------------------------------------------------------------+
void Trace(string name,int sens,double price,datetime time,color couleur)
{
ObjectCreate(0,name,OBJ_ARROW,0,time,price);
if(sens==1)
ObjectSetInteger(0,name,OBJPROP_ARROWCODE,233);
if(sens==-1)
ObjectSetInteger(0,name,OBJPROP_ARROWCODE,234);
ObjectSetInteger(0,name,OBJPROP_COLOR,couleur);
ObjectSetInteger(0,name,OBJPROP_WIDTH,Arrow_Width);
}
//+------------------------------------------------------------------+
//| Delete Arrow Function |
//+------------------------------------------------------------------+
void ClearMyObjects()
{
string name;
for(int i=ObjectsTotal(0,0); i gt =0; i--)
{
name=ObjectName(0,i);
if(StringSubstr(name,0,5)=="Value") ObjectDelete(0,name);
}
}
//+------------------------------------------------------------------+