PROTECTED SOURCE SCRIPT
Mis à jour

ATR Contract Recommendation

114
ATR Contract Recommendation Indicator

Version: 1

New Features and Enhancements:
  • ATR Calculation and Smoothing Options:
  • Calculate ATR using a configurable length.
  • Choose from multiple smoothing methods (RMA, SMA, EMA, WMA).

Account Size Customization:
  • Select your account size from three options: 50K, 100K, or 150K.
  • The contract recommendation logic adjusts dynamically based on the chosen account size.

Instrument-Specific, Customizable Recommendations:
  • Separate sets of customizable ATR thresholds and recommendation texts for each instrument (NQ, ES, YM) and each account size (C = Contract).

For example, for NQ:

150K Account:
ATR < 5 → "5+C"
5–10 → "5C"
10–15 → "3C"
15–30 → "2C"
30+ → "1C"

100K Account:
ATR < 5 → "4C"
5–10 → "2C"
10–15 → "1C"
15–20 → "1C"
20+ → "5C MNQ"

50K Account:
ATR < 5 → "2C"
5–20 → "1C"
20+ → "5C MNQ"

Similar customizable threshold groups have been added for ES and YM, with instrument-specific suffixes (e.g. "MES" or "MYM") appended when needed.

Customizable Display Box (Table):
  • The indicator displays a recommendation box on the chart showing the current ATR value and the recommended contract size.
  • Users can customize the table's position (top left, top right, bottom left, or bottom right).
  • New Feature: Adjustable table size (number of columns and rows) via new input settings.
  • Customize the text color and background color of the recommendation box.


Improvements:
  • Enhanced instrument detection and dynamic recommendation output for a more accurate contract sizing suggestion.


User Interface Enhancements:
  • Streamlined input groups for thresholds and recommendation texts, allowing for full customization based on account size and instrument.
Notes de version
Bug fixes!
Notes de version
Bug Fixes
Notes de version
Bux fixes
Notes de version
ATR Contract Recommendation Extended v1.0 – Patch Notes

New Features:

**ATR Calculation Enhancements:**
- User-selectable ATR length and smoothing method (RMA, SMA, EMA, WMA).

**Account Size Customization:**
- Supports three account sizes: 150K, 100K, and 50K.
- Distinct ATR thresholds and recommendation levels for each account size for NQ, ES, and YM.

**Base Recommendation Functions:**
- Integrated functions (f_getNQRec, f_getESRec, f_getYMRec) that determine the base recommendation from the ATR value based on the thresholds.

**Zero-Lag Moving Average Market Condition:**
- Calculates a zero-lag moving average (ZLMA) on 5‑minute data.
- Determines market condition as “Trending Up” or “Trending Down” based on the ZLMA slope.
- Counts direction changes over a user‑defined lookback period; if too many changes occur, the market is classified as “Chop.”

**Chop Override Logic:**
- When chop override is enabled and the market condition is “Chop”, the final recommendation becomes “INVALID.”
- Otherwise, the final recommendation remains as determined by the ATR-based base recommendation.

**Customizable Table Display:**
- Displays ATR, final recommendation, and market condition in a table on the chart.
- Fully customizable table settings: text color, background color, border width, frame width, text size, and table position.
- Option to remove the table background for a transparent look.

Improvements:
• Fully integrated thresholds and recommendations for multiple account sizes across NQ, ES, and YM.
• Clean integration of the zero-lag moving average logic to assess market trending versus choppiness.
• Robust table display that updates only on the last bar, ensuring minimal chart clutter.

Bug Fixes:
• Resolved issues with undefined function references by defining all required recommendation functions.
• Improved table display logic and background removal functionality.

Enjoy the new features and improved performance!
Notes de version
Bug Fixes

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.