Select Page

Calculating Pivot Points

By definition, a pivot point is a point of rotation. The prices used to calculate the pivot point are the previous period’s high, low and closing price for a security. Prices can be taken from daily stock charts, Another way of calculating Pivot Point is using the hourly charts of stock market.

However most traders prefer to take the pivots, as well as the support and resistance levels, off of the daily charts and then apply those to the intraday charts (i.e., hourly, every 30 minutes or every 15 minutes). When calculated using price information from a shorter time-frame, tends to reduce both accuracy and significance.

The calculation for a pivot point is as follows:

Central Pivot Point (P) = (High + Low + Close) / 3

The formula used for primary resistance and support is as follow:

First Resistance (R1) = (2*P) – Low

First Support (S1) = (2*P) – High

The formula used for secondary resistance and support is as follows:

Second Resistance (R2) = P + (R1-S1)

Second Support (S2) = P – (R1- S1)

Strategy Rules

LE Rules: When a input Price value is found that meets the requirement of a pivot point at low, a long entry order is placed for the next bar.

LX Rules: A low pivot bar is defined by this strategy. As a bar that is preceded by Left Strength (Input) number of higher Price values and followed by Right Strength (Input) number of higher Price values. Long exit takes place

SE Rules: When a Price (Input) value is found that meets the requirement of a pivot point at high, a short entry order is placed for the next bar.

SX Rules: A high pivot bar is defined by this strategy as a bar that is preceded by Left Strength (Input) number of lower Price values and followed by Right Strength (Input) number of lower Price values, short exit takes place.

TradingView Settings for Pivot Extension Pine script Strategy

STEP 1: Download the strategy file here

STEP 2: After that open desired chart in trading view with normal candlestick ,select desired time frame of the chart. Next, follow these steps: (1) Go to pine editor section, remove the default code, (2) paste the downloaded code, (3) save the file and (4) add to chart. See screenshot below.

TradingView settings for Pivot Extension Pine script Strategy

STEP  3: Once Strategy applied on chart, click on settings to optimize parameters  for your own trading.

Left Bars : Number of higher values required on the left side of (preceding) the high pivot bar.

Right Bars : Number of higher values required on the right side of (following) the high pivot bar.

Intraday Trade Session : During this session Entry Trade Will be Taken.

EXIT  Session : During this Trades will be squared off.

Setting Up Alert

Before setting up alert make sure that You have selected desired script, timeframe, strategy settings, apibridge is configured and running. Click in settings add alert and paste {{strategy.order.comment}} in message box.

Important: do not change any settings during live trading.

NOTE: The pinescript works both with webhook alerts (TV Pro plan) and normal popup alerts (TV free plan).STEP 4 : Settings Alerts for Auto Trading with API Bridge . Just Paste {{strategy.order.comment}}  in Alert Window.

That’s all, you are ready to Trade!

Settings Alerts for Auto Trading with API Bridge