OPEN-SOURCE SCRIPT

Landry Proper Order

1 200
Landry Proper Order (LPO)

The Landry Proper Order (LPO) indicator is a comprehensive technical analysis tool for TradingView. It helps traders visualize market trends, monitor trend alignment, detect pullbacks, and track pivot levels using multiple moving averages. It is designed for educational and analytical purposes and does not guarantee profits.

This guide explains each feature, setting, and visual element so even novice traders can understand how to use it effectively.

1. Moving Average Framework

LPO uses up to 5 moving averages to track trend structure:

  • M1 – M5: Each moving average can be SMA (Simple Moving Average) or EMA (Exponential Moving Average).
  • Length: Controls the number of bars used in the moving average calculation (e.g., 10, 20, 50).
  • Color & Width: Customize for easier visualization.
  • Use/Disable: Any moving average can be turned on or off.


Purpose: The proper order of moving averages indicates trend direction:

  • Bullish: Shorter MA above longer MAs (M1 > M2 > M3 …)
  • Bearish: Shorter MA below longer MAs (M1 < M2 < M3 …)


2. Modes of Operation

LPO has two modes for trend detection:

  • Basic Mode – Displays trends based on MA alignment only. Useful for quick structural analysis.
  • Confirmed Mode – Adds additional confirmation by detecting pullbacks and trend locks before signaling a trend. This reduces false signals in choppy markets.


3. Pullback & Lock Detection

LPO can detect potential trend reversals or confirmations:

  • Pullback Detection: When a short-term moving average crosses over or under another, LPO scans recent bars for local highs/lows (pivots) to identify a pullback.
  • Sticky Price: Records the key support/resistance level during pullbacks.
  • Lock Confirmation: Once the trend continues past the pullback, LPO “locks” the trend to confirm its direction.

Why it matters: This helps traders see when a trend may resume after a temporary retracement.

4. Trend Duration & Histogram

  • Counter: Tracks how many bars the current trend has lasted.
  • Histogram: Displays trend duration visually.
  • Colors: Uptrends and downtrends are color-coded for clarity.
  • Transparency & Width: Adjustable for readability.

This visual cue helps you see trends over time without scanning every MA manually.

5. Background States
  • LPO can optionally shade the background to indicate trend strength or potential reversals:
  • Orange/Purple: Trend in progress but not fully confirmed
  • Green/Red: Confirmed uptrend or downtrend
  • Bright Red: Trend reset


Purpose: Provides an intuitive visual snapshot of current market structure.

6. Historical Pivot Lines
  • LPO can draw lines at previous pivot points where trends were confirmed.
  • Adjustable: Max number of lines, line width, color, and style (solid, dashed, dotted).
  • Helps identify support/resistance levels from past trends.


7. Start-of-Trend Bubbles & Info Labels
  • Bubbles: Optional circles marking the beginning of a trend.
  • Info Labels: Show bars since trend start and percentage price change from trend start.
  • Colors: Uptrend = green, Downtrend = red.


Benefit: Gives quick, at-a-glance insights for tracking trend progress.

8. Alerts

LPO supports TradingView alerts for automated monitoring:

  • New Uptrend: Triggered when a confirmed bullish trend starts.
  • New Downtrend: Triggered when a confirmed bearish trend starts.
  • Structural Reset: Triggered if price violates pivot support/resistance.
  • Trend Recovery Confirmed: Triggered when a trend resumes after pullback and lock confirmation.


Use Case: Helps traders monitor trends without constantly watching the chart.

9. Pivot & Line Settings
  • Pivot Length: Determines how many bars are checked to find local highs/lows.
  • Line Style Options: Solid, Dashed, or Dotted for both active trend lines and historical lines.

Purpose: Allows customization of trend visualization according to your charting style.

10. How to Use LPO Safely
  • Educational Tool: LPO is meant to help you visualize trends and market structure, not to guarantee trades.
  • Combine With Other Analysis: Use with volume, candlestick patterns, or other indicators for confirmation.
  • Risk Management: Always use stop-losses, position sizing, and other risk controls.
  • Observe First: Beginners should watch how LPO signals behave on historical charts before trading live.


11. Summary

LPO provides:

  • Multi-MA trend detection
  • Pullback and lock confirmation
  • Visual trend duration with histograms and background states
  • Historical pivot lines for context
  • Optional bubbles and info labels
  • Alerts for trend events


This makes it a powerful educational and analytical tool for novice and advanced traders alike, helping them understand trend structure, pullbacks, and pivot behavior in a transparent and visual way.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.