System Formula

gapellegrini

Newbie
Messages
7
Likes
0
I need a formula of a system tath gives a signal if the high or low of the previous day is reached. But the formula need to be usen in intraday charts because my stop point can be reached before my profit target point. Can someone help me?

Thanks
 
I hope I have understood your question correctly....Try this...I had this on my file, don't know who the real author is...

{Previous Day's High/Low - On intraday Data }

MktStart:=DayOfWeek()<>Ref(DayOfWeek(),-1);
yestHi:= Ref(HighestSince(1,MktStart,H),-1);
yestLo:= Ref(LowestSince(1,MktStart,L),-1);
ValueWhen(1,MktStart,yestLo);
ValueWhen(1,MktStart,yestHi);
 
Zambuck , thanks for your help. I have received the fallowing formula from equis suport:

{ yesterday's high }
newday:=ROC(DayOfWeek(),1,$)<>0;
ValueWhen(1,newday, Ref(HighestSince(1,newday,H),-1));

{ yesterday's low }
newday:=ROC(DayOfWeek(),1,$)<>0;
ValueWhen(1,newday, Ref(LowestSince(1,newday,L),-1));

But I don´t know how to use this formula in the system tester. I need to add the newday as a Indicator?

Thanks
Gabriel
 
just cut and paste both the formulae in system tester windows where required...

The statements in { } will be ignored by MS....

HTH
 
I made tath and the metastock don´t recognize the function newday.
Am I doing something wrong?

thanks
Gabriel
 
Top