俺写了个代码,在北京时间下午3点(图表上是凌晨3点)欧洲开盘后,在图表上画一条竖线标记。可是运行后却提示错误,不知道什么原因。。求解。。 Plot(IIf(time = 0300),1,0),"vertical lines", colorGrey50,1|styleHistogram|styleDashed|styleOwnScale|styleNoLabel,0,1);
哈哈。。搞定了。。正确代码如下: Plot(IIf(TimeNum()> 025958 AND TimeNum()< 030000,1,0),"vertical lines", colorGrey50,1|styleHistogram|styleDashed|styleOwnScale|styleNoLabel,0,1); 应该用TimeNum函数。但是我如果写成TimeNum() = 025959,却不能画线,不知为何。。
Plot( TimeNum () == 30000, "vertical lines", colorGrey50, 1 | styleHistogram | styleDashed | styleOwnScale | styleNoLabel, 0, 1 );
030000整数时间不能划线,改成下面的代码就可以了。。多谢。。 Plot( TimeNum () == 025959, "vertical lines", colorBlue, 1 | styleHistogram | styleDashed | styleOwnScale | styleNoLabel, 0, 1 );
It can Use start time of interval in "Tools - Preferences" Then this will work Plot (TimeNum () == 30000, "vertical lines", colorGrey50, 1 | styleHistogram | styleDashed | styleOwnScale | styleNoLabel, 0, 1);