[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EasyLanguage translation



PureBytes Links

Trading Reference Links

Glen,
The translation that you are looking for depends on the kind of data
that you are using.
For End Of Day data, as Adam states
below, your formula would look like:
Value1:=??? ;
Value2:=???;
Value3:=???; {assumes that ???
are filled in with numbers, variables, or calculations as needed}
A:=Ref(H,-1) - Ref(L,-2);
B:=(Value1+Value2+Value3)/3; {unfortunately,
MetaStock doesn't have a direct AVERAGE or MEAN function}
I assume at this point you are going to do something with A and B, like
using it for maximum range and average range or something similar....
The other situation is for Intraday data. 
If you are using intraday bars, the determination of the high of the previous
day will require a couple more lines.  Everything will be the same
as above, except replace the A:=..... line with the following:
NewDay:=DayOfMonth()<>Ref(DayOfMonth(),-1); {this
finds the breakpoints in your intraday data from one day to the next without
having to worry about the length of afterhours trading}
HHY:=HighestSince(2,NewDay,H); {this
looks at two "newday" occurances backwards, today and yesterday, and finds
the highest value since then}
PDH:=ValueWhen(1,NewDay,HHY); {finally
this selects the HHY value just before today's "newday" occurance}
Dave Nadeau
(My apologies in advance to anyone for whose
mail programs this HTML formatting created difficulty.  I did want
the colors and italics for clarity in the formulas).
Adam Hefner wrote:
I am not real familiar with easy language, but I
know that
the first line translated to MetaStock would be:
 Ref(High,-1) - Ref(Low,-2)
The second line (I can only guess) looks to be an average
of   "Value 1, Value 2, and Value 3".
Adam Hefner
----- Original Message -----
From: Glen Wallace <gcwallace@xxxxxxxx>
To: MetaStock listserver <metastock@xxxxxxxxxxxxx>
Sent: Friday, November 17, 2000 7:07 PM
Subject: EasyLanguage translation
> Would someone kindly translate the following EasyLanguage
> functions for me?
>
> DailyHigh(1) - DailyLow(2)
> AvgList(Value1, Value2, Value3)
>
> Thanks.
>
>