- 精华
- 0
- 在线时间
- 150 小时
- UID
- 4250
- 积分
- 891
- 帖子
- 198
- 阅读权限
- 60
- 注册时间
- 2009-4-28
- 最后登录
- 2019-12-1
- 精华
- 0
- UID
- 4250
- 积分
- 891
- 帖子
- 198
- 主题
- 42
- 阅读权限
- 60
- 注册时间
- 2009-4-28
- 最后登录
- 2019-12-1
|
//------------------------------------------------------------------------
// 简称: qqe
// 名称: qqe
// 类别: 技术指标
// 类型: 其它类
// 输出:
//------------------------------------------------------------------------
Params
Numeric SF(5);
Numeric RSI_Period(14);
Numeric rat(4.236);
Vars
NumericSeries TrLevelSlow(0);
NumericSeries AtrRsi(0);
NumericSeries MaAtrRsi(0);
NumericSeries Rsi(0);
NumericSeries RsiMa(0);
Numeric Wilders_Period(0);
Numeric dar(0);
NumericSeries smin(0);
NumericSeries smax(0);
NumericSeries p;
Begin
Wilders_Period=RSI_Period * 2 - 1;// 14*2-1
If(BarStatus==0)
{
TrLevelSlow=0;
AtrRsi=0;
MaAtrRsi=0;
Rsi=0;
RsiMa=0;
p=0;
}
if(CurrentBar>RSI_Period)
{
Rsi=iRSI(RSI_Period);
RsiMa=XAverage(Rsi,SF);//将RSI 5周期平均
AtrRsi=Abs(RsiMa[1] - RsiMa);//前一周期--今周期
MaAtrRsi=XAverage(AtrRsi,Wilders_Period);
dar=XAverage(MaAtrRsi,Wilders_Period) * rat;
smax=RsiMa+dar;
smin=RsiMa-dar;
p=p[1];
if (RsiMa>smax[1]) {p=1; }
if (RsiMa<smin[1]) {p=-1;}
if(p>0)
{
if(smin<smin[1])
smin=smin[1];
TrLevelSlow=smin; //
if(TrLevelSlow<TrLevelSlow[1])
TrLevelSlow=TrLevelSlow[1];//当 TrLevelSlow 慢速线向下运动时 就把昨天的 慢速线 向后传递 。。目的只向上升 不向下走
}
Else
{
if(smax>smax[1])
smax=smax[1];
TrLevelSlow=smax;
if(TrLevelSlow>TrLevelSlow[1])
TrLevelSlow=TrLevelSlow[1];
}
PlotNumeric("RsiMa",RsiMa);
PlotNumeric("TrLevelSlow",TrLevelSlow);
}
End
//------------------------------------------------------------------------
// 编译版本 GS2004.06.12
// 用户版本 2009/11/07 15:01
// 版权所有 chengjun1201
// 更改声明 TradeBlazer Software保留对TradeBlazer平台
// 每一版本的TrabeBlazer公式修改和重写的权利
//------------------------------------------------------------------------ |
|