- 精华
- 0
- 在线时间
- 675 小时
- UID
- 110114
- 积分
- 380
- 帖子
- 314
- 阅读权限
- 50
- 注册时间
- 2012-4-20
- 最后登录
- 2021-12-29
- 精华
- 0
- UID
- 110114
- 积分
- 380
- 帖子
- 314
- 主题
- 16
- 阅读权限
- 50
- 注册时间
- 2012-4-20
- 最后登录
- 2021-12-29
|
Bool okBuy;
Numeric iMod;
If(BarStatus == 0)
SetGlobalVar(0,-1);
okBuy = False;
If(Close > Open and GetGlobalVar(0) == -1)
SetGlobalVar(0, CurrentTime);
Else If(Close <= Open)
SetGlobalVar(0,-1);
If(GetGlobalVar(0) > -1)
{
// 暂仅考虑日盘(可以通过时间控制增加夜盘)
If(GetGlobalVar(0) >= 0.0900 and GetGlobalVar(0) < 0.1457)
{
iMod = Mod(GetGlobalVar(0)*10000, 100);
If((iMod< 57 and Mod(CurrentTime*10000, 100) - iMod >= 3) or (iMod >= 57 and Mod(CurrentTime*10000, 100) + (60-iMod) >= 3))
okBuy = True;
}
}
If (okBuy == True)
Buy (xx,xx);
|
|