Attachments forums

List of attachments posted on this forum.


All files on forums: 134154

Re: Fibonacci, Trendlines, Support Resistance & Pivot Point Indicators MT4

ashetty033, Sun Jul 09, 2017 9:53 pm

Hi,

Please help me with Minutes/Hourly pivot indicator...
So that I can plot 15min/30min/Hourly pivots...

I have it for Amibroker and Ninjatrader 7..

Code: Select all

_SECTION_BEGIN ("Pivot Levels v1.1");
T_F =ParamList("TF Multiplier","Hour|Min|Day|Week|Month");
iInterval = Param("Interval", 1, 1);
_SECTION_END ();
shift=-1;
switch (T_F)
{
    case "Day":     iPeriod  = inDaily;        break;
    case "Hour":    iPeriod  = inHourly;    break;
    case "Min":        iPeriod  = in1Minute;    break;
}
     xTF = iInterval*iPeriod;
        H1 = TimeFrameGetPrice( "H", xTF, shift );
        L1 = TimeFrameGetPrice( "L", xTF, shift );
        C1 = TimeFrameGetPrice( "C", xTF, shift );
// To calculate the Pivot Levels 
      PP = (H1 + L1 + C1) / 3;
    R1 = (2 * PP) - L1 ;
    S1 = (2 * PP) - H1 ;
    R2 = PP - s1 + r1;
    S2 = PP - (r1 - s1) ;
    R3 = 2 * (PP - L1) + H1 ;
    S3 = L1 - (2 * (H1 - PP));

BC = (H1 + L1)/2;
TC = (PP - BC) + PP;
PlotOHLC(TC,BC,TC,BC,"\nPivot",colorLightGrey, styleCloud);
All files in topic