multicharts基础编程 第013节 循环语句(For...... Begin ...... End循环)
[mp4]http://mp4.qhlt.club/mcode/013.mp4[/mp4] 程式码部分[code]
var:barsbackno(0),highpricesum(0);
barsbackno = 0 ;
highpricesum = 0 ;
{
while barsbackno < 10 begin //cal
highpricesum = highpricesum + Close[barsbackno];
barsbackno = barsbackno +1 ;
end;
}
for barsbackno = 0 to 9 begin
highpricesum = highpricesum + Close[barsbackno];
end;
print(highpricesum/10);
value1 = tl_new(date[1],time[1],highpricesum[1]/10,date,time,highpricesum/10);
[/code] [code]var:barsbackno(0),highpricesum(0);
barsbackno = 0 ;
highpricesum = 0 ;
{
while barsbackno < 10 begin //cal
highpricesum = highpricesum + Close[barsbackno];
barsbackno = barsbackno +1 ;
end;
}
{for barsbackno = 0 to 9 begin
highpricesum = highpricesum + high[barsbackno];
end;
}
for barsbackno = 9 downto 0 begin
highpricesum = highpricesum + high[barsbackno];
end;
print(highpricesum/10);
value1 = tl_new(date[1],time[1],highpricesum[1]/10,date,time,highpricesum/10);
[/code] multicharts量化课程网课PPT下载:[url]http://www.qhlt.cn/thread-143956-1-1.html[/url]
页:
[1]