forexguy18

Naresh CE with 13 62 cross

forexguy18 تم تحديثه   
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.

ملاحظات الأخبار:
Alert condition is included in the logic
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟