OPEN-SOURCE SCRIPT

ANIL's OHCL, VWAP and EMA Cross

Previous Week High and Low:

This part calculates the previous week's high and low values and plots them as continuous blue lines. The plot.style_line ensures the lines are drawn continuously.
Previous Day Open, High, Low, Close:

The script uses request.security to get the previous day's open, high, low, and close values. These are plotted as continuous lines in different colors:
Open: Green
High: Red
Low: Orange
Close: Purple
VWAP (Volume Weighted Average Price):

The VWAP is calculated using ta.vwap(close) and plotted with a thick black line.
Exponential Moving Averages (EMAs):

The script calculates two EMAs: one with a 9-period (fast) and one with a 21-period (slow).
The EMAs are plotted as continuous lines:
Fast EMA: Blue
Slow EMA: Red
EMA Cross:

The script checks for EMA crossovers and crossunders:
A crossover (fast EMA crossing above slow EMA) triggers a buy signal (green label below the bar).
A crossunder (fast EMA crossing below slow EMA) triggers a sell signal (red label above the bar).
Customization:
You can adjust the fastLength and slowLength variables to change the period of the EMAs.
You can modify the line colors and line thickness to match your preferred style.
The buy and sell signals can be customized further with different shapes or additional conditions for signal generation.
This script provides a comprehensive and visually distinct indicator with the previous week's and day's levels, VWAP, and EMA crossover signals.
Bands and ChannelsChart patternsMoving Averages

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script 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 nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité