OPEN-SOURCE SCRIPT

Landry Light with Moving Average

ที่อัปเดต:
Landry Light with Moving Average

Overview:

This Pine Script, titled "Landry Light with Moving Average", visualizes the relationship between price action and a chosen moving average (MA) over time. It helps users easily identify periods where the price stays consistently above or below the moving average, which can be a useful indicator of bullish or bearish trends.

Key Features:

  1. Moving Average Type Selection:


The script allows users to choose between two types of moving averages:

Exponential Moving Average (EMA)
Simple Moving Average (SMA)

This is done via a user input option, enabling traders to tailor the indicator to their preferred analysis method.

  1. Moving Average Length:


Users can set the length of the moving average (default is 21 periods). This allows customization based on the trader's time frame, whether short-term or long-term analysis.

  1. Dynamic Moving Average Color:


The moving average line changes color based on the relationship between the price and the MA:

Green: Price is consistently above the MA (bullish condition).
Red: Price is consistently below the MA (bearish condition).
Blue: Price is crossing or close to the MA (neutral or indecisive condition).

  1. Cumulative Days Above/Below MA:


The script tracks and displays the number of consecutive days the price remains above or below the moving average:

Cumulative Days Above: Shown as a green histogram above the zero line.
Cumulative Days Below: Shown as a red histogram below the zero line.

This feature helps users identify sustained trends or potential reversals.

  1. Real-time Labels:


The script generates dynamic labels that display the count of cumulative days the price has stayed above or below the moving average.
These labels are positioned near the moving average on the chart, providing an easy reference for traders.

How Users Can Benefit:

  1. Trend Identification:


By visually representing how long the price stays above or below a key moving average, traders can identify strong bullish or bearish trends. This can inform entry and exit points.

  1. Visualizing Market Sentiment:


The colored moving average line and histogram help traders quickly assess market sentiment. A prolonged green MA line suggests a strong uptrend, while a prolonged red line indicates a downtrend.

  1. Adaptability:


With customizable moving average types and lengths, the indicator can be tailored to fit various trading strategies, whether for day trading, swing trading, or long-term investing.

  1. Reversal Signals:


A shift from cumulative days above to cumulative days below (or vice versa) can serve as an early signal of a potential market reversal, allowing traders to adjust their positions accordingly.

  1. Simplified Decision-Making:


The combination of visual cues (colors, histograms, and labels) simplifies decision-making, allowing traders to focus on trend strength rather than complex calculations.

Usage:

To use this script:

  1. Add the Indicator to Your Chart:


Select the desired moving average type and length.
The script will plot the moving average, colored by the trend, and display cumulative days above or below it.

  1. Interpret the Signals:


Use the histogram and labels to gauge the strength of the trend.
Monitor color changes in the moving average for potential trend reversals.

  1. Incorporate into Your Strategy:


Combine this indicator with other tools (e.g., volume analysis, RSI) to confirm signals and refine your trading strategy.

This indicator is particularly useful for traders who follow the "Landry Light" concept, emphasizing the importance of price staying above or below a moving average to determine trend strength.







เอกสารเผยแพร่
Updated the label to display price change once the low has moved above. It will be the pivot point and price change will be display on day 2 from close of day 1. On day 1 , it will display as zero.

Price change will be zero again when the high is below the moving average on day 1, percent price change will display on day to relative to close of day 1.

Distance of current price is also shown from the moving average.

สแนปชอต

This concept is taken from chapter 3 Trend Qualifiers of the book Dave Landry on Swing Trading written by David S. Landry in year 2000. In Chapter it is named as DAYLIGHT. Author calls it Landry Light as well.

2/20-DAY EMA BREAKOUT SYSTEM DEFINED

It was published In December of 1996 in Stocks And Commodities Magazine.

Buy alert: If today's low and yesterday's low is greater than the 20-day EMA. This
signal remains valid until the low touches or falls below the 20-day EMA.

Buy entry: Place a stop order 10 ticks above the two-day high. This will help ensure
buying with the new trend and help to avoid false signals. Keep order until filled or as
long as the buy alert is still valid.

Long exit: Place a stop equal to the 20-day EMA. Continue to update this stop daily to
form a trailing stop.

Sell alert: If today's high and yesterday's high is less than the 20-day EMA. This signal
remains valid until the high touches or rises above the 20-day EMA.

Sell entry: Place a stop order 10 ticks below the two-day low. This will help ensure that
you will sell with the new trend and help to avoid false signals. Keep order until filled or
as long as the sell alert is still valid.

Short exit: Place a stop equal to the 20-day EMA. Continue to update this stop daily to
form a trailing stop.

Users can adopt it their choice of EMA/SMA to study length and strength of the trend.
CyclesstatisticsTrend Analysis

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?

คำจำกัดสิทธิ์ความรับผิดชอบ