Mean-Reversion from May TASC

A forum for all EdgeRater users

Moderator: Chris White

Post Reply
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

Mean-Reversion from May TASC

Post by henry1224 »

Here is the code from the May TASC Mean-Reversion

Under the parameter tab

LN1 Double 10 0 100
LN2 Double 100 0 1000


Under the script tab

sma:= MA(c,LN1);
lma:= MA(c,LN2);
dev:= std(c,LN1);
z: (C - sma)/dev,Width2,ColorBlack;
FillRgn(Z<= -1,Z,-1),Brush#5000FF00;
FillRgn(Z>=1,Z,1),Brush#50FF0000;



Here is the code for the long entry

Use the same parameter tab

under the script tab

sma:= MA(c,LN1);
lma:= MA(c,LN2);
dev:= std(c,LN1);
z:= (C - sma)/dev,Width2,ColorBlack;
Event:(z < -1) & (sma > lma),Width2,ColorGreen;


here is the code for the long exit

use the same parameter tab

under the script tab

sma:= MA(c,LN1);
lma:= MA(c,LN2);
dev:= std(c,LN1);
z:= (C - sma)/dev,Width2,ColorBlack;
Event:z > -0.5,Width2,Color Blue;

Here is the code for the sell short

use the same parameter tab

under the script tab

sma:= MA(c,LN1);
lma:= MA(c,LN2);
dev:= std(c,LN1);
z:= (C - sma)/dev,Width2,ColorBlack;
Event:(z > 1) & (sma < lma),Width2,ColorRed;

Here is the code for the short exit

use the same parameter tab

under the script tab

sma:= MA(c,LN1);
lma:= MA(c,LN2);
dev:= std(c,LN1);
z:= (C - sma)/dev,Width2,ColorBlack;
Event:z < 0.5,Width2,ColorViolet;
bsegura
Posts: 32
Joined: Tue Jan 12, 2021 11:56 am

Re: Mean-Reversion from May TASC

Post by bsegura »

Hey...
Try applying a 55 period Hull Moving Average also looking with Heikin Ashi candle option

your code with modification:

sma:= MA(c,LN1);
lma:= MA(c,LN2);
dev:= std(c,LN1);
z: (C - sma)/dev,Width2,ColorBlack;
FillRgn(Z<= -1,Z,-1),Brush#5000FF00;
FillRgn(Z>=1,Z,1),Brush#50FF0000;

HullMA(z,55),colororange,width3;
Post Reply