product
three day rolling pivot.mq4
Category : Forex-Indicators Subategory : MT4-Indicators (1637) 4

Indicator Review: ACD_3.mq4 - Three Day Rolling Pivot

This Metatrader 4 (MT4) indicator, titled ACD_3, calculates and displays pivot levels based on a three-day rolling period. Pivot points are commonly used in forex trading and other markets to identify potential support and resistance levels. Here's a detailed review of its functionality and impact on the trading chart:


Core Purpose

The ACD_3 indicator identifies and draws pivot points along with their associated support and resistance ranges (Pivot Range Top and Pivot Range Bottom) based on a user-defined time period across three days. This provides traders with a dynamic method to assess market conditions and potential price levels for trading decisions.


Inputs

  1. PivotRangeStart and PivotRangeEnd:
    Define the start and end times for the pivot range calculation.
    Example: "21:00" might signify a session close time for certain markets.

  2. DisplayPivotPoint (Boolean):
    Controls whether the central pivot point line is shown on the chart.


Buffers

The indicator uses three buffers to display data on the chart:

  • Buffer1: The central pivot point.
  • Buffer2: The top of the pivot range.
  • Buffer3: The bottom of the pivot range.

Key Functional Steps

1. Initialization (init)

  • Sets up the visual styles for the pivot point and range lines:
    • Pivot Point: Green, dotted line.
    • Pivot Range Top: LimeGreen, dashed line.
    • Pivot Range Bottom: LimeGreen, dashed line.
  • Links these styles to buffers for drawing on the chart.

2. Main Calculation (start)

  • Loops through historical bars to find the open and close bars for the specified PivotRangeStart and PivotRangeEnd times.
  • Tracks these bars for three consecutive days to calculate the high, low, and close values used in the pivot calculations.

3. Pivot Range Values (calculatePivotRangeValues)

  • Computes the pivot range's high, low, and close values for the specified period.

4. Drawing the Pivot Indicators (drawIndicators)

  • Calculates:
    • Central Pivot Point: Pivot Point=High+Low+Close3\text{Pivot Point} = \frac{\text{High} + \text{Low} + \text{Close}}{3}
    • Pivot Range Top and Bottom: Pivot Diff=High+Low2Pivot PointPivot Top=Pivot Point+Pivot DiffPivot Bottom=Pivot PointPivot Diff\text{Pivot Diff} = \left| \frac{\text{High} + \text{Low}}{2} - \text{Pivot Point} \right| \text{Pivot Top} = \text{Pivot Point} + \text{Pivot Diff} \text{Pivot Bottom} = \text{Pivot Point} - \text{Pivot Diff}
  • Plots these levels on the chart using the defined buffers.

5. Comment Display

  • Outputs the calculated high, low, and close values of the pivot range directly on the chart for reference.

Impact on Trading Chart

  • Visual Elements:

    • Displays a central pivot point line and two range boundaries (top and bottom), which dynamically adjust based on recent price activity over the last three days.
  • Trader's Use:

    • Helps identify support and resistance levels for planning trades.
    • The three-day rolling calculation makes the indicator adaptive to recent market conditions, offering a more current perspective compared to static daily pivots.

Key Notes

  • Customization:
    The indicator allows traders to modify the pivot range calculation time using the PivotRangeStart and PivotRangeEnd inputs, making it adaptable to different trading sessions.

  • Scalability:
    It works effectively across various instruments, including forex pairs and commodities like gold, thanks to its ability to handle varying decimal places (nDigits).


Strengths

  • Dynamically adjusts based on recent market activity.
  • Easy to use with customizable time inputs.
  • Provides a comprehensive view of the central pivot and its associated range.

Limitations

  • Performance may decrease on large data sets due to the nested loops in start.
  • Does not provide entry/exit signals—only key levels for reference.

This MT4 indicator is ideal for traders who rely on pivot-based analysis to predict price movements and make strategic trading decisions in forex or other financial markets.

Total Download (1637)

We may use cookies or any other tracking technologies when you visit our website, including any other media form, mobile website, or mobile application related or connected to help customize the Site and improve your experience. learn more

Allow