CBOT:ZN1!   Hợp đồng tương lai T-Note 10 năm
When a coder creates something new, mostly that is with his/her own style. This makes them artists in a way I believe :)
While it is nice to develop a specific style, writing things on a certain way can be very important to understand better what is written.


This example shows a style, while it is possibly nice to see, is very hard to decipher...



Here is the same code, written in a different way, making it easier to read.



indicator("ConeCode-Linefill,educational", max_lines_count=500, overlay=true)

color1 = input.color(color.new(color.blue    , 35), 'color 1')
color2 = input.color(color.new(color.lime    , 35), 'color 2')
color3 = input.color(color.new(color.red     , 35), 'color 3')
iFill  = input.bool (true,'fill')
s1     = ta.sma (close, 1000)
s2     = ta.sma (close,  200)
l1     = plot  (s1    , 'l1')
l2     = plot  (s2    , 'l2')
topVal = s1   > s2    ? math.min(s1, s2)     : math.max(s1, s2)
botVal = s1   > s2    ? math.max(s1, s2)     : math.min(s1, s2)
topCl  = iFill        ? s1 > s2 ? color3     : color1     : na
botCl  = iFill        ? s1 > s2 ? color1     : color2     : na
fill(l1, l2, topVal, botVal, topCl, botCl)


More information:


LuxAlgo Dev: www.luxalgo.com
PineCoder: www.pinecoders.com

- We cannot control our emotions,
but we can control our keyboard -
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.