forexguy18

Naresh CE with 13 62 cross

forexguy18 Mis à jour   
ema
Thank you to Lauris, for sharing knowledge and logic for the EMA cross-over (13/62).

The provided Pine Script is a custom script, which is designed to display Chandelier Exit levels on the price chart and generate buy and sell labels based on specific conditions.

Here's a breakdown of the key components and logic of the Pine Script:

Exponential Moving Averages (EMAs):

ema1: The 13-period Exponential Moving Average (EMA) of the closing price.
ema2: The 62-period Exponential Moving Average (EMA) of the closing price.
EMA Plotting:

The script plots the ema1 (13 EMA) and ema2 (62 EMA) lines on the price chart using the plot() function.
Chandelier Exit Calculation:

The Chandelier Exit values are calculated using the Average True Range (ATR).
The script calculates the atr (Average True Range) using the atr() function with the given length.
longStop is calculated as the highest price of the specified length minus the ATR, and shortStop is calculated as the lowest price plus the ATR.
Directional Indicator (dir):

The dir variable is used to determine the direction of the Chandelier Exit based on the comparison of the current close price with the previous long and short stops.
Buy and Sell Signals:

The script generates buy signals when the Chandelier Exit direction changes from short to long (buySignal).
Similarly, sell signals are generated when the Chandelier Exit direction changes from long to short (sellSignal).
The conditions for buy and sell signals are based on the value of dir and its previous value.
Buy and Sell Labels:

Buy and sell labels are plotted on the chart using plotshape() based on the generated buy and sell signals.
The showLabels input parameter controls whether to display the buy and sell labels.
Highlighting States:

The script fills the chart area with color (green for long, red for short) based on the direction of the Chandelier Exit values.
The highlightState input parameter controls whether to apply this highlighting.
Alerts:

The script includes alert conditions based on the direction change (changeCond), buy signal (buySignal), and sell signal (sellSignal) using the alertcondition() function.
The script aims to help traders identify potential buy and sell signals based on the Chandelier Exit levels derived from the 13 EMA and 62 EMA crossovers. The Chandelier Exit values can serve as dynamic stop-loss levels for long and short positions.

Notes de version:
Alert condition is included in the logic
Script open-source

Dans le véritable esprit de 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 le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?