multicharts基础编程 第004节 量化基础bar的介绍之bar的回溯
[mp4]http://mp4.qhlt.club/mcode/004.mp4[/mp4] 在信号中,显示绝对编号语句:[code]Value1=Text_New(Date,Time,low-5 point,NumToStr(symbol_currentbar,0));
[/code]在信号中,显示相对编号语句:[code]
Value2=Text_New(Date,Time,high+5 point,NumToStr(currentbar,0));
[/code] 在bar中 bar绝对编号 = bar相对编号 + maxbarsback bar相对编号的另一种表示方法是barnumber.
BarNumber 函数类似于保留字 CurrentBar。但是,CurrentBar 并不允许引用前面的柱状线:BarNumber[5](五条柱状线前的柱状线)是正确的,然而,Currentbar[5] 却不正确,不起作用。 [code]if currentbar=1 then begin
print("currentbar=",currentbar,",time[0]=",time[0],",close[0]=",close[0]);
print("time[1]=",time[1],",close[1]=",close[1]);
print("time[2]=",time[2],",close[2]=",close[2]);
print("time[3]=",time[3],",close[3]=",close[3]);
print("time[4]=",time[4],",close[4]=",close[4]);
print("time[5]=",time[5],",close[5]=",close[5]);
print("time[6]=",time[6],",close[6]=",close[6]);
print("time[7]=",time[7],",close[7]=",close[7]);
print("time[8]=",time[8],",close[8]=",close[8]);
end;[/code]指定barnumber输出回溯的bar的价格值。 [img]http://p.algo2.net/2023/0827/6a4ae21be35d6.png[/img] multicharts量化课程网课PPT下载:[url]http://www.qhlt.cn/thread-143956-1-1.html[/url]
页:
[1]