Daily Range Indicator For MT5
Table Of Contents:
- Daily Range Indicator For MT5
- Installing the Daily Range Indicator For MT5
- Parameters of the Daily Range Indicator For MT5
- Buffers of the Daily Range Indicator For MT5
- Main Parts Of The Code
The Daily Range Indicator For MT5 analyze the daily high and low of the market and display two important lines in the price chart. The lines act as the dynamic support and resistance level. You need to look for the bearish reversal signal when the price starts to trade near the red line. And look for the bullish reversal signal when the price trades near the blue line. The best way to make more money is to rely on the candlestick pattern. Learn to trade the market by using the most reliable candlestick pattern and use the indicators line as your potential trading zone.
Installing the Daily Range 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 dailyrange.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 Daily Range Indicator For MT5
The Daily Range Indicator For MT5 has 0 parameters to configure.
Buffers of the Daily Range Indicator For MT5
The Daily Range Indicator For MT5 provides 2 buffers.
SetIndexBuffer(0,up,INDICATOR_DATA); SetIndexBuffer(1,dn,INDICATOR_DATA);
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 &tick_volume[], const long &volume[], const int &spread[]) { //-- house keeping int limit,copied; datetime start=D 2010.1.1 ; if(prev_calculated==0) limit=0; else limit=prev_calculated-1; //--copy data datetime dayTime[]; double dayHigh[],dayLow[]; copied=CopyTime(_Symbol,PERIOD_D1,start,time[rates_total-1],dayTime); if(copied lt =0) return -1; copied=CopyHigh(_Symbol,PERIOD_D1,start,time[rates_total-1],dayHigh); if(copied lt =0) return -1; copied=CopyLow(_Symbol,PERIOD_D1,start,time[rates_total-1],dayLow); if(copied lt =0) return -1; //-- calculate indicators MqlDateTime mdtDay,mdt; for(int i=limit; i lt rates_total; i++) { TimeToStruct(time[i],mdt); for(int j=0; j lt copied; j++) { TimeToStruct(dayTime[j],mdtDay); if(mdtDay.day==mdt.day) { up[i] = dayHigh[j]; dn[i] = dayLow[j]; } } } return(rates_total); } //+------------------------------------------------------------------+