PineCoders

Color Gradient Framework - PineCoders FAQ

Provides a suite of functions to:
— Allow the selection of one of 3 color schemes, each containing a pair of bull/bear colors.
— Generate 10-level gradients for each color.
— Use two types of gradient calculations: one for unbounded and one for bounded signals. We call the 2 modes: Advance/Decline and Relative.

Features
These gradients are designed to work with 2 base colors for each element you want to color: one color for bullish and one for bearish conditions. Each base color can be generated in 10 shades, for a total of 20 possibilities for each graphic element (e.g., the fill between two MAs or a MACD histogram). Each gradient is expressed internally as a float from zero to ten. Any value <= 1 returns the lightest shade. Any value > 9 returns the brightest shade.

Two modes of gradient generation are offered:
► 1. Advance/Decline
This mode is better for unbounded signals. To determine brightness, it uses advances/declines of the signal rather than its relative position in a fixed range.

► 2. Relative
This mode is preferable for bounded signals such as RSI . It uses the relative position of the signal to determine the gradient.

Notes
— For demonstration purposes, this script allows coders to play with the settings of the signals used to generate examples of both gradient modes.
— The code is pretty fast.
— Doesn't require extra plots.
— All color schemes performs well on both light and dark chart backgrounds.
— These are simple gradients with only 10 levels, which will nonetheless provide more visual information than uniform colors. While the transitions are relatively smooth, the lack of depth in the number of shades will produce rather coarse gradients compared to high-quality graphic functions which will also typically be slower.
— The code structure makes it relatively easy to add color schemes. When doing so, you may need to fine-tune the transparencies of some colors, especially ones towards the extremities. For better compatibility, you should validate that your choices perform well on both dark and white chart backgrounds.
— For any given base color, the same color is used for all gradients of that base color. Only the transparency varies. If you wanted 100% opaque gradients, you would need to find the zero (or "ff" in hex) transparency RGB equivalents required for each of a base color's 10 gradients.
— While the gradients are currently composed of different brightness levels of the same base color, you could also configure them using different hues completely (e.g., rainbow color). It's up to you.
Phát hành các Ghi chú: Updated comments.
Phát hành các Ghi chú: Tidied up code.
Phát hành các Ghi chú: Tidied up code again )
Phát hành các Ghi chú: Included a compact version of the functions at the end of the script.
Mã nguồn mở

Với tinh thần của TradingView, tác giả đã xuất bản tập lệnh theo mã nguồn mở, vì thế trader có thể dễ dàng hiểu và tùy chỉnh được. Bạn có thể sử dụng miễn phí, hoặc tùy chỉnh lại mã đã được cấp phép bởi Quy tắc Chung. Bạn có thể sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
Tools and ideas for all Pine coders: http://www.pinecoders.com
Our Pine FAQ & Code: http://www.pinecoders.com/faq_and_code/
Pine news broadcasts: https://t.me/PineCodersSquawkBox or https://twitter.com/PineCoders

Bình luận

PineCoders on 🔥
+3 Phản hồi
realy Realy thanks
+1 Phản hồi
Wow guys! Thank you for that detailed tutorial! Amazing job!
+1 Phản hồi
Colorful, well done, nice!
+1 Phản hồi
PineCoders RootDuk
@RootDuk, Thx. Appreciate. It's a simple, hopefully easy to use and, from a performance point of view, low-cost way to improve the looks of our stuff.
Phản hồi
please include in Pine color shemes like that. Start color, end color and a step point between @PineCoders Thank you.
Phản hồi
Beautiful one!
Phản hồi
PineCoders seatfive
@seatfive, Thx! Happy you and other authors like it. We should be adding a set of 16-color levels functions soon. Will provide more smoothness while still being fast enough for small numbers of fills.
Phản hồi
You censor the best scripts on tradingview to promote your scam. You have no skill and no knowledge. When a script is pure quality you censor it. TradingView is the CNN of trading
Phản hồi
PineCoders sevensphere
@sevensphere, Thanks for sharing your opinion.
Phản hồi
Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Cách thức hoạt động Tính năng Biểu đồ Trả phí Giới thiệu bạn Quy tắc Áp dụng Trung tâm Trợ giúp Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Thư viện Biểu đồ Lightweight Blog & Tin tức Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Giới thiệu bạn Xu Ticket Hỗ trợ của tôi Trung tâm Trợ giúp Tin nhắn riêng Trò chuyện Đăng xuất