OPEN-SOURCE SCRIPT

תחזית ממוצע נע (4 ממוצעים)

32
Visualize potential future movements of up to four Simple Moving Averages (SMAs) with this customizable forecasting tool for TradingView, built on Pine Script v4.

How It Works:
This indicator plots your chosen SMAs and then, from the most recent bar, projects their paths into the future. The projection is based on a single, global 'Future Price Change %' that you define. This allows you to model how the SMAs might react under different market scenarios (e.g., if the price is expected to rise by 10%, fall by 5%, or remain flat).

Key Features:

Four Configurable SMAs: Set distinct lengths and colors for up to four different SMAs.
Global Price Change Scenario: Input a single percentage (positive, negative, or zero) to simulate future price behavior, which then drives all SMA projections.
Adjustable Projection Horizon: Specify how many future bars to project the SMAs over.
Clear Visuals: Current SMAs are plotted as solid lines, while their future projections are displayed as corresponding dotted lines for easy differentiation.
Important Note (Pine Script v4):
Due to line drawing limitations in Pine Script v4 (max_lines_count=500), when all four SMAs are active, the 'Future Bars to Inspect' input is capped at 126. This ensures the script functions correctly within platform limits (drawing 125 segments * 4 SMAs = 500 lines).

Use Cases:

Anticipate potential future support and resistance levels based on projected SMA crossovers or positions.
Analyze how different SMAs might behave if the market trends up, down, or sideways by your assumed percentage.
Enhance your technical analysis by adding a forward-looking dimension to your SMA strategy.
This script is an extension of an idea by vladimir.kamba, modified to support four SMAs and provide future projections.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.