
等级: 标准版
- 注册:
- 2023-2-16
- 曾用名:
|

楼主 |
发表于 2024-2-29 14:46
|
显示全部楼层
你这个说法不对喔, barpos 可以确定当前等价k线根数(我试过的是等价k线的根数,不是基础周期的根数),明显可与判断当前k线是否已经下过单
variable:buy_t:=0;
if kd and barpos > buy_open_t and holding=0 then begin
买开:BUY(1,1,LIMITR,PRICE);
buy_t = barpos
end
这样写会重复触发下单吗?
补充内容 (2024-2-29 14:47):
你这个说法不对喔, barpos 可以确定当前等价k线根数(我试过的是等价k线的根数,不是基础周期的根数),明显可与判断当前等价k线是否已经下过单
补充内容 (2024-2-29 14:48):
buy_open_t应该是buy_t,如下
if kd and barpos > buy_t and holding=0 then begin
补充内容 (2024-2-29 14:48):
variable:buy_t:=0;
if kd and barpos > buy_t and holding=0 then begin
买开:BUY(1,1,LIMITR,PRICE);
buy_t = barpos
end |
|