Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:求助交易开拓者指标转成金字塔语言,十分感谢!

1楼
唐方一战 发表于:2016/10/10 13:45:13
老师你好,我有一个交易开拓者的指标,想问问能否帮我转还成金字塔的,十分感谢!

Params

Numeric Length(55) ;
Numeric OverSold(30) ;
Numeric OverBought(70) ;
Vars

Numeric A;
Numeric B;
NumericSeries NetChgAvg( 0 );
NumericSeries TotChgAvg( 0 );
Numeric SF( 0 );
Numeric Change( 0 );
Numeric ChgRatio( 0 ) ;
NumericSeries RSIValue;
NumericSeries RSIMA;
//------------------------------------------
NumericSeries NetChgAvg1( 0 );
NumericSeries TotChgAvg1( 0 );
Numeric SF1( 0 );
Numeric Change1( 0 );
Numeric ChgRatio1( 0 ) ;
NumericSeries RSIValue1;
NumericSeries RSIMA1;
Begin
//----------------------DATA0--------------------------------------------------
If(CurrentBar <= Length - 1)
{
NetChgAvg = ( DATA0.Close - DATA0.Close[Length] ) / Length ;
TotChgAvg = Average( Abs( DATA0.Close - DATA0.Close[1] ), Length ) ;
}Else
{
SF = 1/Length;
Change = DATA0.Close - DATA0.Close[1] ;
NetChgAvg = NetChgAvg[1] + SF * ( Change - NetChgAvg[1] ) ;
TotChgAvg = TotChgAvg[1] + SF * ( Abs( Change ) - TotChgAvg[1] ) ;
}
If( TotChgAvg <> 0 )
{
ChgRatio = NetChgAvg / TotChgAvg;
}else
{
ChgRatio = 0 ;
}
RSIValue = 50 * ( ChgRatio + 1 );
RSIMA = Average(RSIValue,13);
//----------------------------DATA1---------------------------------------------
If(CurrentBar <= Length - 1)
{
NetChgAvg1 = ( DATA1.Close - DATA1.Close[Length] ) / Length ;
TotChgAvg1 = Average( Abs( DATA1.Close - DATA1.Close[1] ), Length ) ;
}Else
{
SF1 = 1/Length;
Change1 = DATA1.Close - DATA1.Close[1] ;
NetChgAvg1 = NetChgAvg1[1] + SF1 * ( Change1 - NetChgAvg1[1] ) ;
TotChgAvg1 = TotChgAvg1[1] + SF1 * ( Abs( Change1 ) - TotChgAvg1[1] ) ;
}
If( TotChgAvg1 <> 0 )
{
ChgRatio1 = NetChgAvg1 / TotChgAvg1;
}else
{
ChgRatio1 = 0 ;
}
RSIValue1 = 50 * ( ChgRatio1 + 1 );
RSIMA1 = Average(RSIValue1,13);
A = data0.RSIMA;
B =data1.RSIMA1;
PlotNumeric(" A",A);
PlotNumeric(" B",B);
PlotNumeric("超买",OverBought);
PlotNumeric("超卖",OverSold);
End


2楼
jinzhe 发表于:2016/10/10 13:54:18
麻烦注释一下
3楼
唐方一战 发表于:2016/10/10 14:01:13
我就是看不懂计算机语言,不好意思了
4楼
jinzhe 发表于:2016/10/10 14:18:36
这个是其他软件的计算语言,我们也无能为力
共4 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.02734 s, 3 queries.