TradingView
GuruprasadMeduri
11 juin 2020 17:50

CPR with SMA, EMA, VWAP & Super Trend by GuruprasadMeduri 

Infosys LimitedNYSE

Description

This script will allow to add CPR with Standard Pivots and 4 Indicators.

Standard Pivot has 9 levels of support and 9 levels of resistance lines. It has CPR , 3 levels of Day-wise pivots , 3 levels of Weekly pivots and 3 Levels of Monthly Pivots .
In Addition to the CPR and Pivot, this script will allow user to Add 4 more Indicators - SMA, EMA, VWAP and SuperTrend as well.

All the Support and resistance levels can be enabled / disabled from settings. It will allow to select multiple combinations of support and resistance levels across 3 levels at any of the 3 time-frames individually and combined.
All 4 Indicators can be can be enabled / disabled from settings. This will allow the indicators to be plotted individually and combined along with any combination of CPR & Pivots.

These number of combinations will allow user to visualize the charts with desired indicators, pivot support & resistance levels on all or any of the 3 time frames.

For Ease of access, listed few points on how the script works..

- CPR and day-wise level 1 & 2 (S1 & R1) enabled by default and can be changed from settings
- Day-wise Level 2 & 3 (S2, R2, S3 & L3) can be enabled from settings
- Weekly 3 levels and Monthly 3 levels can be enabled from settings
- CPR & pivot levels colored in blue lines
- All support levels colored in Green
- All resistance levels Colored in Red
- Day-wise pivot , support & resistance are straight lines
- Weekly pivot , support & resistance are cross (+) lines
- Weekly pivot , support & resistance are circle (o) lines
- SMA, EMA, VWAP and SuperTrend Enabled by Default
- SMA Colored in Orange
- EMA Colored in Red
- EMA Colored in Teal
- SuperTrend Colored in standard Red & Green with triangle arrows
- Any combinations can be selected from settings-> Inputs & style

Notes de version

Corrected EMA
Commentaires
dotradingwithtrend
Nice Work
Can you also add day high low & previous (D/W/M) low high to this ??
rcp4989
@dotradingwithtrend, yes its also better to understand previous day activity on same day chart.
sandeshmm
if you add PDL, PDH, WL and WH then it is complete script
pdebasis
Its great combination Guru ! I am using this CPR for long and was looking at the CPR+VWAP+ST+At least 2 MA. Its good. Just a suggestion, with CPR , along with current/today's
1. Can you also inject previous (D/W/M) levels - its missing but is important
2. Similarly, if you can also inject for RSI and Volume with MA (configurable) at the bottom ribbon , then all these would be a lethal combo ..

Thanks for understanding. regards.
IdeasSJ
Hi Sir,

Thanks for the wonderful script. Few issues observed. Can you please look into and update?
1. EMA is not respecting the length input given and picking the SMA length. May be due to "EMAvg = ema (SMASource, SMALength)". I do not know to code but able to read and take some understandings.

//EMA
PlotEMA = input(title = "Plot EMA?", type=input.bool, defval=true)
EMALength = input(title="EMA Length", type=input.integer, defval=50)
EMASource = input(title="EMA Source", type=input.source, defval=close)
EMAvg = ema (SMASource, SMALength)

2. CPR calculation is giving difference when I do manual calculation to test. Observed the difference in all stocks (NIFTY) checked. Can you please look into? As per my understanding on CPR Pivot, it should be same through out based on last trading day's High, Low and Close. Not sure whether your script picking current day instead of keeping it fixed based on previous day. Kindly check it.

Thank you.
GuruprasadMeduri
@satheeshjohn, Thank you very much for your feedback.

1. EAM - that was a mistake and you pointed out the exact mistake. Corrected now. Thank you very much!
2. CPR is based on Last trading day HLC. I tried to plot over the CPRs developed by other Script developers on a static chart and it exactly matched. I will try to check this in a live session. There should not be a difference!

Thanks,
GuruprasadMeduri
IdeasSJ
@GuruprasadMeduri, Thank you. I may be wrong on CPR as I am not regular in stock market or TradingView. Out of curiosity when I looked into the CPR formulas manually and also validated by cross checking through another developer script named "CPR by KGS - GOMATHI SANKAR", I could find the real difference and notified you. So please check the values. If right, I am sorry and it may be due to my inexperience.
umakanth.umakanth786
Guru prasad garu
Thank you for indicator if Low & High of Day are added which be of great help
casp3yrulezz60613
Hi Bro ,, Your indicator is nice ,, Instead of Super trend Please add RSI and Camarilla Pivot with R3,R4,R5 and S3,S4,S5 along with Multiple Time Frame. This will give good result
VP156
pls add pdh and pdl
Plus