multicharts基础编程 第013节 循环语句(For...... Begin ...... End循环)
- UID
- 2
- 积分
- 2874604
- 威望
- 1387331 布
- 龙e币
- 1487273 刀
- 在线时间
- 13155 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
multicharts基础编程 第013节 循环语句(For...... Begin ...... End循环)
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|
|
|
|
|
|
- UID
- 2
- 积分
- 2874604
- 威望
- 1387331 布
- 龙e币
- 1487273 刀
- 在线时间
- 13155 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
程式码部分
- 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);
复制代码 |
|
|
|
|
|
|
- UID
- 2
- 积分
- 2874604
- 威望
- 1387331 布
- 龙e币
- 1487273 刀
- 在线时间
- 13155 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
- 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);
复制代码 |
|
|
|
|
|
|
- UID
- 2
- 积分
- 2874604
- 威望
- 1387331 布
- 龙e币
- 1487273 刀
- 在线时间
- 13155 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
|
|
|
|
|
|