- UID
- 2
- 积分
- 2874604
- 威望
- 1387331 布
- 龙e币
- 1487273 刀
- 在线时间
- 13155 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
【BarPeriodN】
- Inputs: ResNum(NumericSimple), SessNum(NumericRef),DateBar(NumericRef),TimeBar(NumericRef),OpenBar(NumericRef),MaxBar(NumericRef),MinBar(NumericRef),CloseBar(NumericRef);
- //BarPeriodN(sessionstarttime(0,4),BDate,BTime,BOpen,BHigh,BLow,BClose);
- Variables:
- intrabarpersist SOpen(0),
- intrabarpersist SMinBar(0),
- intrabarpersist SMaxBar(0),
- intrabarpersist SCloseBar(0),
- intrabarpersist SDateBar(0),
- intrabarpersist STimeBar(0);
- if CurrSess(ResNum,SessNum) then begin
- SMaxBar = maxlist(SMaxBar,High data(ResNum));
- SMinBar = minlist(SMinBar,Low data(ResNum));
- SCloseBar = Close data(ResNum);
- SDateBar = Date data(ResNum);
- STimeBar = Time data(ResNum);
- BarPeriodN = false;
- #return;
- end;
-
- if NewSessN(ResNum,SessNum) then begin
- DateBar= SDateBar;
- TimeBar= STimeBar;
- OpenBar= SOpen;
- MaxBar = SMaxBar;
- MinBar = SMinBar;
- CloseBar = SCloseBar;
-
- SOpen = Open data(ResNum);
- SMinBar =9999;
- SMaxBar = 0;
- BarPeriodN = true;
- #return;
- end;
-
- BarPeriodN = false;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|