是否有可能划清未来的界限?
Is it possible to draw a line into the future?
对于盘中时间框架。
是否可以在会话的第一个柱上画一条水平线,其长度一直到该会话结束?
因此,本质上是在 'future' 中画一条线。
像这样:
好像可以。
以下代码基于 PineCoders-LucF to one of my previous questions line.new draws 2 lines instead of 1
的回答
//@version=4
study("FutureLine", overlay=true)
start = timestamp(2020,03,13,10,30,0)
stop = timestamp(2020,03,16,16,00,0)
level = 2575
var line ln = line.new(start, level, stop, level, xloc=xloc.bar_time)
if barstate.islast
line.set_x1(ln, start)
line.set_x2(ln, stop)
这导致
对于盘中时间框架。
是否可以在会话的第一个柱上画一条水平线,其长度一直到该会话结束?
因此,本质上是在 'future' 中画一条线。
像这样:
好像可以。
以下代码基于 PineCoders-LucF to one of my previous questions line.new draws 2 lines instead of 1
//@version=4
study("FutureLine", overlay=true)
start = timestamp(2020,03,13,10,30,0)
stop = timestamp(2020,03,16,16,00,0)
level = 2575
var line ln = line.new(start, level, stop, level, xloc=xloc.bar_time)
if barstate.islast
line.set_x1(ln, start)
line.set_x2(ln, stop)
这导致