PureBytes Links
Trading Reference Links
|
Can someone convert these TWO indicators it is in tradestation code
to metastock code. It is a pretty good indicator I think. Thanks.
KS
Omega TradeStation.
===================================
{Percentage Trend Indicator with correction filter and dynamic
period of trend calculation}
Inputs:
K(15), {%Coeff. of correction}
Max_per(50); {Max. Dynamic Period for Trend Calculation}
Vars: Trend(C), Period(0) ; {Trend Calculation}
Condition1= C > Trend[1]; {UpTrend}
Condition2= C <= Trend[1]; { DownTrend}
{SetUp Period When New Trend Begin}
If C Cross over Trend[1] or C Cross Below Trend[1] Then Period = 0;
If Period < Max_per Then Begin {Counting UpTrends with dynamic
period}
If Condition1 Then Begin
Period = Period +1;
Trend = Highest(C,Period)[1]∗(1 — (K/100));
End ; {Counting DownTrends with dynamic period}
If Condition2 Then Begin
Period = Period + 1;
Trend = Lowest(C,Period)[1]∗(1 + (K/100));
End;
End Else Begin {Counting UpTrends with constant period}
If Condition1 Then Trend = Highest(C,Max_per)[1]∗(1 — (K/100));
{Counting DownTrends with constant period}
If Condition2 Then Trend = Lowest(C,Max_per)[1]∗(1 + (K/100));
End; {Plotting Indicator}
Plot1(Trend, «Trend»);
======================================
Omega TradeStation.
{Volatility Trend Indicator based on Smoothed True Range
and dynamic period of trend calculation}
Inputs:
Len(21), {WATR Lenght}
M(3), {WATR Multiplier}
Max_per(50); {Max. Dynamic Period for Trend Calculation}
Vars: TrueHi(H), TrueLo(L), TrueRng(0), WATR(0), Trend(C), Period
(0) ;
{Calculate Smoothed TR}
If Close[1] > High Then TrueHi = Close[1] Else TrueHi = High;
{Calculate TrueHigh}
If Close[1] < Low Then TrueLo = Close[1] Else TrueLo = Low;
{Calculate TrueLow}
TrueRng = TrueHi — TrueLo; {Calculate TrueRange}
WATR = WAverage(TrueRng,Len); {Calculate WATR}
{Trend Calculation}
Condition1= C > Trend[1]; {UpTrend}
Condition2= C <= Trend[1]; { DownTrend}
{SetUp Period When New Trend Begin}
If C Cross over Trend[1] or C Cross Below Trend[1] Then Period = 0;
If Period < Max_per Then Begin {Counting UpTrends with dynamic
period}
If Condition1 Then Begin
Period = Period +1;
Trend = Highest(C,Period) — M∗WATR;
End ; {Counting DownTrends with dynamic period}
If Condition2 Then Begin
Period = Period + 1;
Trend = Lowest(C,Period) + M∗WATR;
End;
End Else Begin {Counting UpTrends with constant period}
If Condition1 Then Trend = Highest(C,Max_Per)[1] — M∗WATR;
{Counting DownTrends with constant period}
If Condition2 Then Trend = Lowest(C,Max_per)[1] + M∗WATR;
End; {Plotting Indicator}
Plot1(Trend,»Trend»);
========================================
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h9qnglf/M=362343.6886682.7839641.1493532/D=groups/S=1705375617:TM/Y=YAHOO/EXP=1123797168/A=2894354/R=0/SIG=11qvf79s7/*http://http://www.globalgiving.com/cb/cidi/c_darfur.html">Help Sudanese refugees rebuild their lives through GlobalGiving</a>.</font>
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> 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/
|