OPEN-SOURCE SCRIPT

SWING TRADE

ATR Calculation:

The Average True Range (ATR) is used to measure volatility.
atr_length defines the period over which ATR is calculated default: 14.
Pivot Average:

A 10-day simple moving average pivot avg is calculated using the closing price.
Buy and Sell Signals:

Buy Signal: When the price is above the pivot average plus a multiple of ATR.
Sell Signal: When the price is below the pivot average minus a multiple of ATR.
The atr_multiplier determines how sensitive the buy/sell levels are to price movements.
Visual Elements:

The pivot average is plotted as a blue line on the chart.
Buy and sell signals are plotted as green and red labels below and above bars, respectively.
Strategy Execution:

The strategy enters a long position when a buy signal is triggered.
It exits the long position when a sell signal is triggered.
Bill Williams IndicatorsBreadth IndicatorsChart patterns

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?

Penafian