PureBytes Links
Trading Reference Links
|
Andrew:
How about:
HHVStop:= If(PDSTrade > 0, HighestSince(1, PDSTrade <= 0, HIGH), PREV);
Where PDSTrade > 0 if you are in a trade and PDSTrade <= 0 if you're not in a
trade. If you want to define PDSTrade automatically as the point at which you
entered the trade, perhaps use:
EntrySignal:= Cross(Close, Mov(Close,10,Simple)); {or whatever your entry is}
PDSTrade:= If(PREV <= 0,
{Did you enter a trade today? If so, PDSTrade equals the Close}
If(EntrySignal = 1, CLOSE, 0),
{Your trade was entered before today, but was it stopped today? If so,
PDSTrade equals the negative value of the Close}
If(LOW <= PREV - PREV*0.10, -PREV, {or whatever your money mgmt stop is}
PREV));
I haven't tested whether this works, but hopefully it conveys what I'm trying
to say.
----- Original Message -----
From: Kornberg Family
To: Metastock List
Sent: Tuesday, April 18, 2000 5:09 AM
Subject: A Round about way for Date Function
Hi,
Metastock still does not have a date function. I have a workaround but
unfortunately some of the other Metastock functions eg. HHV cannot use a
passed number.
Here is a Days in trade plot.
Days in Trade
Day1 := Input("Day of Trade",1,31,4);
Month1 := Input("Month of Trade",1,12,1);
Year1 := Input("Year of Trade",1900,2400,2000);
PdsTrade:=BarsSince(DayOfMonth()=Day1 AND Month()= Month1 AND Year()= Year1);
PdsTrade;
I would like to be able to pass the number of days into HHV but it does not
allow me to do this. I want to do the following:
HHVStop:= HHV(H,PDSTrade) ;
Can anyone suggest a workaround?
Thanks,
Andrew
|