- 精华
- 0
- 在线时间
- 16 小时
- UID
- 273947
- 积分
- 12
- 帖子
- 6
- 阅读权限
- 10
- 注册时间
- 2018-12-24
- 最后登录
- 2020-4-23
- 精华
- 0
- UID
- 273947
- 积分
- 12
- 帖子
- 6
- 主题
- 4
- 阅读权限
- 10
- 注册时间
- 2018-12-24
- 最后登录
- 2020-4-23
|
小米 发表于 2018-12-26 15:00
这是哪里来的代码呢?
这不是TB的语法啊。
Params
Numeric Length(26);
Numeric Offset(2);
Vars
Numeric UpLine; //上轨
Numeric UpLine2; //上中轨
Numeric DownLine; //下轨
Numeric DownLine2; //下中轨
NumericSeries MidLine; //中间线
Numeric Band;
Begin
MidLine = AverageFC(Close,Length);
Band = StandardDev(Close,Length,2);
UpLine = MidLine + Offset * Band;
DownLine = MidLine - Offset * Band;
UpLine2 =(MidLine + UpLine)/2;
DownLine2=(MidLine+DownLine)/2;
PlotNumeric("上",UpLine);
PlotNumeric("下",DownLine);
PlotNumeric("中",MidLine);
PlotNumeric("上中",UpLine2);
PlotNumeric("下中",DownLine2);
if (AlertEnabled & & Close Uplot CrossOver UpLine2))
{
Alert("Do Alert "BUY");
}
if (AlertEnabled Close DownTo CrossOver UpLine2))
{
Alert("Do Alert "SellShort");
}
if (AlertEnabled Close Close Uplot CrossOver DownLine2))
{
Alert("Do Alert "BUY");
}
if (AlertEnabled Close DownTo CrossOver DownLine2))
{
Alert("Do Alert "SellShort");
}
End
我想收盘价上穿上中轨做多,下穿上中轨做空,以下类似
下面的代码怎么修改以下 |
|