Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Please use the proper code tags as it makes posts easier to read, differentiating code from text. Notice the lambda and alpha variables, and how they interact? Can you see what each is doing? OK, now simplify it. Code:
Gperiode:=10;
Kperiode:=3;
kurs:= (H + L + C) / 3;
{
MULTIPLICATION BEYOND NECESSITY
lambda:=GPeriode/KPeriode;
alpha:=lambda*(GPeriode-1)/(GPeriode-lambda);
}
alpha:= (Gperiode-1) / (Kperiode-1);
ma1:= Mov(kurs, Gperiode, W);
ma2:= Mov(ma1, Kperiode, W);
nmax:=(alpha+1)*ma1 - alpha * ma2;
{plot}
nmax;
Not exactly rocket science, but then again, trading doesn't have to be complicated. You can also make things a little more customised in accordance with the book by using some Input() functions (which of course, cannot be used in EST or explorations) Code:
GPeriode:=Input("Periodeneinstellung",1,100,10);
KPeriode:=Input("Abtastperioden",2,100,3);
method:=Input("MA Auswahl: 1-MAS, 2-MAE, 3-MAW, 4-NONE",1,4,3);
kurs:= (H + L + C) / 3;
alpha:=(GPeriode-1)/(KPeriode-1);
ma1:=
If(method=1,Mov(kurs,GPeriode,S),
If(method=2,Mov(kurs,GPeriode,E),
If(method=3,Mov(kurs,GPeriode,W),
kurs)));
ma2:=
If(method=1,Mov(ma1,KPeriode,S),
If(method=2,Mov(ma1,KPeriode,E),
If(method=3,Mov(ma1,KPeriode,W),
kurs)));
nmax:=ma1*(alpha+1)-alpha*ma2;
{plot}
nmax
[edited code: wrong version on clipboard!] HyperionAUT wrote:Any idea what it could also beeing used for? It's just another data smoothing device; it's usefulness is up to each individual trader. People spend a lot of time making indicators and scouring the internet for codes and secrets; time I reckon is better spent actually trading! HyperionAUT wrote:Finally, compared with the Safezones from Dr. Elder... <-- they are much better. Safezones are better? Or, is this "new" MA better? Again, that decision will change with each trader. wabbit [:D]
|