AladdinAI

Line Oscillator

The input parameters include src, the source data for the indicator, presmooth, an integer value that determines the number of periods to use for pre-smoothing the source data, length, an integer value that determines the number of periods to use for calculating the relative strength index (RSI), smoothtype, a string value that determines whether to use the Hull moving average (HMA) or the Jurik moving average (JMA) for smoothing the RSI, smooth, an integer value that determines the number of periods to use for smoothing the RSI, and power, a float value that determines the power to use for the JMA calculation.

The script then performs some calculations, including pre-smoothing the source data using an exponential moving average (EMA), calculating the RSI from the pre-smoothed data, and smoothing the RSI using either the HMA or the JMA, depending on the value of smoothtype. The script also includes a function called calc_jma that calculates the JMA from a given source data and parameters.

Finally, the script plots the smoothed RSI on the chart and includes horizontal lines at various levels as well as an optional volume bar.
Mã được bảo vệ
Tập lệnh này được xuất bản mã nguồn đóng và bạn có thể sử dụng một cách tự do. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ. Bạn không thể xem hoặc sửa đổi mã nguồn.
Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?