- 精华
- 0
- 在线时间
- 0 小时
- UID
- 266050
- 积分
- 3
- 帖子
- 2
- 阅读权限
- 10
- 注册时间
- 2018-5-28
- 最后登录
- 2018-6-29
- 精华
- 0
- UID
- 266050
- 积分
- 3
- 帖子
- 2
- 主题
- 1
- 阅读权限
- 10
- 注册时间
- 2018-5-28
- 最后登录
- 2018-6-29
|
Vars
Numeric M9_001(0); //定义变量M9_001并赋值
Bool M1_001(False); //定义过程变量M1_001并赋值
Begin
M1_001 = A_SellPosition>10000 And A_BuyPosition>10000;
If(M1_001) //如果没有多单和空单。注:持仓一万基本不可能,所以将一万手作为判断是否有持仓的条件
{
PlotString ("Bear Market","仓单"+text(A_SellPosition)+text(A_BuyPosition)+"手",Close,yellow,0);
Unplot("Bear Market",1);
Return;
}
If(A_BuyPosition>0 And A_BuyPosition<10000) //如果有多单
{
PlotString ("Bear Market","多单"+text(A_BuyPosition)+"手",Close,yellow,0);
Unplot("Bear Market",1); //擦掉前一个显示//
}
If(A_SellPosition>0 And A_SellPosition<10000)
{
PlotString ("Bear Market","空单"+text(A_SellPosition)+"手",Close(),yellow,0);
Unplot("Bear Market",1);
}
End //我的问题是这一行为什么不随之最新价位置跳动 PlotString ("Bear Market","仓单"+text(A_SellPosition)+text(A_BuyPosition)+"手",Close,yellow,0); |
|