基于数字滤波器的交易策略 - 页 83

 

...

现在仇恨被埋葬了(我希望是永久的),我想向所有参加过去几天共同努力的人表示祝贺。

这不是比争吵更好吗?

向你们所有人问好

mladen

 

leledc

"如果x 小于-1或超过1,MathArccos(x)返回NaN(不确定的值)。" 我在测试中没有得到这个错误,但为了安全起见,你只需要改变这个(第253行)。

w=MathArccos(b/2.0);[/php]to this : [php] w=MathArccos(MathMax(MathMin(b/2.0,1),-1));

问候

mladen

leledc:
我犯了一个错误:那是一个基于Double stoch的实验......现在我将纠正这个错误。

P.s. 我正在开发一个自动模式下设置最佳FFT设置的EA,但有一个问题:当我启动EA时,我有这样的情况

2010.01.18 16:47:30 Fourier_Extrapolation_of_Indicator Color 1.2 EURUSD,M5: MathArccos函数的无效值。

我不知道如何纠正这个错误(我试过了,但没有成功)......Mladen如果你在这里,请你给我你的巨大帮助?????,谢谢你
 

辛巴、莱德克和公司

我们怎样才能得到这个?你能解释一下这个辛巴吗?我想轮流...

附加的文件:
gbpjpyh4.gif  79 kb
 

轮番上阵

learntrader:
我们怎样才能得到这个呢?你能解释一下这个辛巴吗?我想抓住这些转弯......

Learntrader。

我建议你用一种方法来训练自己使用交易工具....,那2天的训练呢?

现在,你又成为了寻找HG的牺牲品......

没有HG,只有好的和坏的工具以及使用它们的好方法和坏方法,这就是全部。

重要的 工具是在支撑位和阻力位的价格行为......然后通过这些傅里叶斯和一个好的策略,你可以获得额外的优势......但是,你永远不会抓住所有的转折。

我认为,即使是mladen也最多只能捕捉到92%的转折,而MrTools最多只能捕捉到89%。

谢谢

S

 
learntrader:
我们怎样才能得到这个呢?你能解释一下这个辛巴吗?

是的,图表上的箭头是怎么形成的?

我没有理解清楚,对不起。

今天忘了带智力药片。

 
mrtools:
嗨,Leledc,不确定,但这可能与你要找的东西相似。

哦,谢谢你,但我已经发了两个帖子(也是在tradestation的主题里),而且mladen还提出了和你一样的解决方案!谢谢

 
Big Joe:
是的,是什么让图表上的箭头出现?

我没有理解清楚,对不起。

今天忘了我的智力药丸。

如果我记得很清楚,Simba使用超级信号来实现这些箭头......

 
leledc:
哦,谢谢你,但我已经发了两个帖子(也是在tradestation的主题里),而且Mladen还提出了和你一样的解决方案!谢谢。

哇哦,没看到Mladen在那里发了另一个版本的帖子来回答你。

 
leledc:
我有一个tradestation fucntion:我想把它转换成mql(在mt4中移植tradestation indi).下面是mql中的原始和我的函数版本.它不能很好地工作,所以我希望这里有专家的帮助。

易语言

{Gaussian Filter}

Inputs: Price(NumericSeries), iptPeriod(NumericSimple), iptPoles(NumericSimple);

variables: aa(0), b(0), w(0), x(0), y(0), y1(0), y2(0), y3(0), y4(0),

a_1(0), a_12(0), a_13(0), a_14(0), a2(0), a3(0), a4(0), Pi(3.141592654),

sqrtOf2(1.414213562), Period(2), poles(0);

if (iptPeriod < 2) then

Period = 2

else

Period = iptPeriod;

// Number of filter poles must be between 1 and 4, inclusive

if iptPoles < 1 then

poles = 1

else if iptPoles > 4 then

poles = 4

else

poles = iptPoles;

// initialization - performed only for first bar

if CurrentBar = 1 then

begin

w = 2 * Pi / Period; // omega

w = 180 * w / Pi; // in degrees

b = (1 - cosine(w)) / (power(sqrtOf2, 2.0/poles) - 1.0);

aa = -b + squareroot(b*b + 2*b);

a_1 = 1.0 - aa;

a_12 = a_1 * a_1;

a_13 = a_1 * a_1 * a_1;

a_14 = a_12 * a_12;

a2 = aa * aa;

a3 = aa * aa * aa;

a4 = a2 * a2;

y1 = Price;

y2 = y1;

y3 = y2;

y4 = y3;

end;

{ Calculate your indicator value here }

x = Price;

if (poles = 1) then

y = aa * x + a_1 * y1

else if (poles = 2) then

y = a2 * x + 2 * a_1 * y1 - a_12 * y2

else if (poles = 3) then

y = a3 * x + 3 * a_1 * y1 - 3 * a_12 * y2 + a_13 * y3

else if (poles = 4) then

y = a4 * x + 4 * a_1 * y1 - 6 * a_12 * y2 + 4 * a_13 * y3 - a_14 * y4;

y4 = y3; // delayed by four bars

y3 = y2; // delayed by three bars

y2 = y1; // delayed by two bars

y1 = y; // delayed by one bar

Gauss = y;

[/php]Mql

[php]

double Gauss(double Price, double iptPeriod,double iptPoles){

double aa, b, w, x, y, y1, y2, y3, y4,a_1, a_12, a_13, a_14, a2, a3, a4;

double Pi=3.141592654;

double period=21, poles;

if (iptPeriod < 2)

period = 2;

else

period = iptPeriod;

if (iptPoles < 1){

poles = 1;

}

else if (iptPoles > 4){

poles = 4;

}

else{

poles = iptPoles;

}

// initialization - performed only for first bar

for(int i = Price; i >= 0; i--){

w = 2 * Pi / period; // omega

w = 180 * w / Pi; // in degrees

b = (1 - MathCos(w)) / (MathPow(MathSqrt(2.0),2.0/poles) - 1.0);

aa = -b + MathSqrt(b*b + 2*b);

a_1 = 1.0 - aa;

a_12 = a_1 * a_1;

a_13 = a_1 * a_1 * a_1;

a_14 = a_12 * a_12;

a2 = aa * aa;

a3 = aa * aa * aa;

a4 = a2 * a2;

y1 = Price;

y2 = y1;

y3 = y2;

y4 = y3;

}

for(i = Price; i >= 0; i--){

x = Price;

y = a4 * x + 4 * a_1 * y1 - 6 * a_12 * y2 + 4 * a_13 * y3 - a_14 * y4;//we don't need y1 y2 y3 y4

}

return (y);

}

嗨,Leledc。

不确定,但这可能与你要找的东西相似。

EDIT: Posted wrong version correct version on post#841

 
leledc:
如果我记得很清楚,辛巴用超级信号来做这些箭头......。

谢谢!