- UID
- 2
- 积分
- 2874604
- 威望
- 1387331 布
- 龙e币
- 1487273 刀
- 在线时间
- 13155 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
【draw_DOM_level】
- Input:
- price(NumericSimple), size(NumericSimple), token(NumericSimple),
- MaxSize(NumericSimple), Color(NumericSimple), IsLast(TrueFalse);
- const : array_max_size(20);
- array: intrabarpersist chnls[array_max_size](0);
- array: intrabarpersist chnltxts[array_max_size](0);
- var : _date(0), _time(0), _date_m(0), _time_m(0);
- _date = 0;
- _time = 0;
- _date_m = 0;
- _time_m = 0;
- calc_dt_range(size / MaxSize, _date, _time, _date_m, _time_m);
- if (token > array_max_size) then #return;
- if chnls[token] <> 0 then tl_delete(chnls[token]);
- chnls[token] = tl_new_s( _date, _time, price, _date_m, _time_m, price);
- tl_setextright(chnls[token], true);
- tl_setcolor(chnls[token], Color);
- tl_setsize(chnls[token], 10);
- if chnltxts[token] <> 0 then text_delete(chnltxts[token]);
- chnltxts[token] = text_new_s(_date_m, _time_m, price, text(size:0:0));
- text_setattribute(chnltxts[token], 1, true);
- text_setcolor(chnltxts[token], white);
- var: idx(0);
- if IsLast then begin
- for idx = token + 1 to array_max_size begin
- if chnls[idx] <> 0 then begin
- tl_delete(chnls[idx]);
- chnls[idx] = 0;
- end;
- if chnltxts[idx] <> 0 then begin
- text_delete(chnltxts[idx]);
- chnltxts[idx] = 0;
- end;
- end;
- end;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|