TradingView
raveshave
٧ أيار مايو ٢٠٢٠ ٠٤:٣٤

All past Levels 

NTPC LTDNSE

الوصف

Contains all past levels that we need
1. Previous Monthly High
2. Previous Monthly Low
3. Previous Weekly High
4. Previous Weekly Low
5. Previous Daily High
6. Previous Daily Low
7. Previous Monthly Range Average (PMH+PML)/2
8. Previous WeeklyRange Average (PWH+PWL)/2
9. Previous Daily Range Average (PDH+PDL)/2
10. Monthly Open
11. Weekly Open
12. Daily Open

ملاحظات الأخبار

Now inputs for 50% Levels are updated too

ملاحظات الأخبار

This update contains High Timeframe levels for Positional traders and Swing traders.
Also Added 3day and 8hour level for 24 hour markets like Forex and Cryptocurrency which I found of value. 8H level particularly for BTC futures funding time which can be adjusted is of importance.
Update:
- Previous Year High Low and 50%
- Previous Half Yearly High Low and 50%
- Previous Quarter High Low and 50%
- Previous 3D Levels
-Previous 8Hour level
التعليقات
UnknownUnicorn605379
Would it be possible to just show current All Time High, just previous year high and low? Less clutter? Perhaps an input selection?
raveshave
@olly.farmer, Hi, The script is open source, you can remove all unwanted levels from the code and save only those you want. Go to this indicator and locate " { } " near settings icon and edit the code . Paste this for Prev Year HL in code :

syh = input(true, title = "Prev Year High") //input for prev year high
syh = input(true, title = "Prev Year Low") //input for prev year low

pyh = security(tickerid, '12M', high[1]) //ticker for prev year high
pyl = security(tickerid, '12M', low[1]) //ticker for prev year low

//color
pyhc = pyl != pyh[1] ? na : aqua
pylc = pyl != pyl[1] ? na : orange

//plotting

plot(syh and pyh ? pyh : na, title = "Prev Year High", style = line, linewidth = 2, color = pyhc)
plot(sml and pml ? pml : na, title = "Prev Year Low", style = line, linewidth = 2, color = pylc)
UnknownUnicorn605379
@raveshave, Thanks for the suggestion. I have tried your adapted script but unfortunately got a compile error. So made newbie changes but to no avail. Last year high / low not displaying correctly. PS Ideally looking for this year (2021) high and last year (2020) hi and lo.

//Created by raveshave
//Displays the previous monthly/weekly/daily high/low over current price. Also shows the weekly and daily open price over current price and 50% of Previous weekl, Monthly and Daily

study(title = "ATHs", shorttitle = "ATHs current and previous", overlay = true)

//Inputs
//new
syh = input(true, title = "Prev Year High") //input for prev year high
syl = input(true, title = "Prev Year Low") //input for prev year low
//

//Tickers
//new
pyh = security(tickerid, '12M', high[1]) //ticker for prev year high
pyl = security(tickerid, '12M', low[1]) //ticker for prev year low
//

//Color
//new
pyhc = pyl != pyh[1] ? na : aqua
pylc = pyl != pyl[1] ? na : orange
//

//Plots
//new
plot(syh and pyh ? pyh : na, title = "Prev Year High", style = line, linewidth = 2, color = pyhc)
plot(syl and pyl ? pyl : na, title = "Prev Year Low", style = line, linewidth = 2, color = pylc)
//
gokultamizh98
sir this what version of pin script sir
raveshave
suryavelala2050
can you add lables to each levels , thank you, like pdh, pdl, pdc
raveshave
@suryavelala2050, Thanks for the suggestion. I also thought about it, but it would clutter the chart too much. rather I color code each label and memorize them. For yearly: Thick red, For Quarterly: Orange, For Daily: White etc. For 50%levels you can select same color but style like circle or cross can be chosen. I hope you got the point.
salmanmiah
Great Indicator ;)
المزيد