PropTradingShop

(PCL) Previous Close

I have recently been reading How to Day Trade for a Living by Andrew Aziz and one of the important support and resistance levels he talks about is the Previous Day Close Price.

I did not find an indicator that would simply plot this so I wrote a short simple pine script to plot the indicator.

Please feel free to edit or suggest improvements.
Script open-source

Dans le plus pur esprit de TradingView, l'auteur de ce texte l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur ! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par les règles internes. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Commentaires

why I am getting tickerid error ?
Répondre
nagashravan Kotha_Rao
@Kotha_Rao, You have to user syminfo.tickerid
Répondre
Unfortunately indicators shows wrong close price because on intraday chart correct close price is at 1600EST
Any ideas how to correct this?
Répondre
@inet100, This shows the previous days closing price. Intraday charts would shows yesterdays closing price.
Répondre
inet100 PropTradingShop
@PropTradingShop, Isn't previous day equal to yesterday ? Anyway, is there solution to get close level at 1600 to calculate gap size?
Répondre
@inet100, This closing price is literally coming from Pines day variable so it is accurate. If you want to track the gap you need to have ext hours on and keep track of each session separately.
Répondre
inet100 PropTradingShop
@PropTradingShop, Yes, I use ext hours and looking the way to calculate the difference between 1600 price and current price in premarket (before 0930)
Répondre
You don't need a script for this, it should be under settings for the chart.
Make sure to check off show previous close
Répondre
PropTradingShop casanova1012
@casanova1012, Yup, they have the setting now, at the time they didn't.
Répondre
Intuitive_Trader casanova1012
@casanova1012, actually this scrip is useful and different from what's under settings. It plots the previous close from a session to a session while the Tradingview from settings plots last previous close all across the chart. So if you go back let's say 5 or 6 days ago you'll see the same closing price from the last session.
@PropTradingShop, thank you for sharing the script.
Répondre