- 精华
- 0
- 在线时间
- 11 小时
- UID
- 15901
- 积分
- 76
- 帖子
- 22
- 阅读权限
- 30
- 注册时间
- 2010-9-8
- 最后登录
- 2012-10-11
- 精华
- 0
- UID
- 15901
- 积分
- 76
- 帖子
- 22
- 主题
- 5
- 阅读权限
- 30
- 注册时间
- 2010-9-8
- 最后登录
- 2012-10-11
|
改指标是博易大师里面提供的Short指标,做短线和波段还是可以,在30分钟图上,当红色或者蓝色走完3个Bar的时候选择进去,时机选的好,还是不错的。。
//------------------------------------------------------------------------
// 简称: SHT
// 名称: ShortIndicator
// 类别: 技术指标
// 类型: 振荡类
// 输出:
//------------------------------------------------------------------------
Params
Numeric MALength(10);
Numeric A1(0.1);
Numeric A2(0.05);
Vars
Numeric TB_t(0);
Numeric TS_t(0);
Numeric Vol0_t(0);
NumericSeries Short_t(0);
NumericSeries Short_tmp(0);
NumericSeries Vol1_t(0);
NumericSeries Vol2_t(0);
NumericSeries MA_short(0);
NumericSeries StaticNum(0);
NumericSeries StaticNum2(0);
Bool TmpSign(false);
Begin
If(CurrentBar==0)
{
Vol1_t = 0;
Vol2_t = 0;
}
Else
{
if(High>Close[1])
TB_t = High - Close[1]+Close-Low;
Else
TB_t = Close - Low;
if(Close[1]>Low)
TS_t = Close[1]-Low +High -Close;
Else
TS_t = High -Close;
if(TB_t!=0&&TS_t!=0)
{
if(BarType==1)
{
Vol0_t = (TB_t-TS_t)*Vol*(225/BarInterval())/(TB_t+TS_t)/10000;
}
else
Vol0_t = (TB_t-TS_t)*Vol/(TB_t+TS_t)/10000;
}
Vol1_t= A1*Vol0_t+(1-A1)*Vol1_t[1];
Vol2_t = A2*Vol0_t+(1-A2)*Vol2_t[1];
Short_t = Vol1_t-Vol2_t;
Short_tmp = Short_t;
MA_short = XAverage(Short_t,MALength); //To static all the data from the beginning
if(Short_t>=0)
PlotNumeric("Short",Short_t,Red);
else
PlotNumeric("Short",Short_t,Blue);
PlotNumeric("ShortTMP",Short_tmp,White);
PlotNumeric("MAShort",MA_short,Yellow);
}
End
//------------------------------------------------------------------------
// 编译版本 GS2004.06.12
// 用户版本 2010/08/01 13:24
// 版权所有 s040440330
// 更改声明 TradeBlazer Software保留对TradeBlazer平台
// 每一版本的TrabeBlazer公式修改和重写的权利
//------------------------------------------------------------------------ |
|