PureBytes Links
Trading Reference Links
|
Dear all,
Could anyone please help me to translate two following
programming code to metastock indicator formula so we
get the indicators as shown in attached image :
New Highs/Lows (Indicator)
---------------------------------------------------
Input: TrendDays(5), Excess(8);
Variables: NewHigh(0), NewHighVal(0), NewLow(0),
NewLowVal(0);
if H>NewHighVal[1] then begin
NewHighVal=H;
NewHigh=NewHigh[1]+1;
end
else begin
if LinearRegAngle(AvgPrice, TrendDays)<0 then begin
NewHighVal=H;
NewHigh=0;
end
else begin
NewHighVal=NewHighVal[1];
NewHigh=NewHigh[1];
end;
end;
if L<NewLowVal[1] then begin
NewLowVal=L;
NewLow=NewLow[1]+1;
end
else begin
if LinearRegAngle(AvgPrice, TrendDays)>0 then begin
NewLowVal=L;
NewLow=0;
end
else begin
NewLowVal=NewLowVal[1];
NewLow=NewLow[1];
end;
end;
Plot1(NewHigh,"New Highs");
Plot2(-NewLow,"New Lows");
Plot3(Excess,"OverB");
Plot4(-Excess,"OverS");
IF CheckAlert Then Begin
IF Plot1 >= Plot3 then Alert("Overbought");
IF Plot2 <= Plot4 then Alert("Oversold");
IF Plot1 < Plot1[1] then Alert("Reset Count");
IF Plot2 > Plot2[1] then Alert("Reset Count");
End;
---------------------------------------------------
CandlelineRecord (Indicator)
---------------------------------------------------
Variables: Lng(0),Supprt(c), Resistnce(c);
Lng=Volatility(8);
if Lng <= AbsValue(O - C) then begin
if C>O then
Supprt=(O+C)/2
else
supprt=supprt[1];
if C<O then
Resistnce=(O+C)/2
else
Resistnce=Resistnce[1];
end;
Plot1(Supprt,"Support");
Plot2(Resistnce,"Resistance");
---------------------------------------------------
Appreciate the help very much
Thanks in advance
Tono
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|