OPEN-SOURCE SCRIPT
Proper Candles

adjustedOpen = close[1]
The candle’s open is set to the previous candle’s close, rather than the actual open.
This creates a continuous price flow from one candle to the next, visually eliminating gaps.
adjustedHigh = math.max(high[0], close[1])
The high of the candle is adjusted to be the maximum between the actual high of the current candle and the previous close.
This ensures that the high fully encompasses any price movement from the previous close to the current high.
adjustedLow = math.min(low[0], close[1])
The low is set as the minimum between the current low and the previous close, again ensuring continuity in the visual range of the candle.
These adjustments are primarily aimed at eliminating price gaps and creating a more consistent visual representation of price action.
The candle’s open is set to the previous candle’s close, rather than the actual open.
This creates a continuous price flow from one candle to the next, visually eliminating gaps.
adjustedHigh = math.max(high[0], close[1])
The high of the candle is adjusted to be the maximum between the actual high of the current candle and the previous close.
This ensures that the high fully encompasses any price movement from the previous close to the current high.
adjustedLow = math.min(low[0], close[1])
The low is set as the minimum between the current low and the previous close, again ensuring continuity in the visual range of the candle.
These adjustments are primarily aimed at eliminating price gaps and creating a more consistent visual representation of price action.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
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.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
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.