PureBytes Links
Trading Reference Links
|
The code below gives me an error of:
Error 3.Condition in IF, WHILE, FOR
statementshas to be Numeric or Boolean type
Problem area highlighted below.
Anyone see the problem?
Thanks
Ara
PS: Does anyone have this code already (John
Ehler's Trendline). Trying to convert from Trade Station
//File: DEV - Ehler Trendline
Price =(H+L)/2<FONT
size=1>;
Imult =0.635;
Qmult =0.338;
InPhase =0;
Quadrature =0;
Phase =0;
DeltaPhase =0;
count =0;
InstPeriod =0;
Period =0;
Trendline =0;
if (<FONT color=#0000ff
size=1>LastValue(<FONT color=#0000ff
size=1>BarIndex()) > <FONT color=#ff00ff
size=1>5)
//Detrend Price
{Value3 = Price - Ref<FONT
size=1>(Price,-7);}
//Compute InPhase AND Quadrature components
Inphase = 1.25<FONT
size=1>*(Ref<FONT
size=1>(Value3,-4) -
Imult*Ref<FONT
size=1>(Value3,-2)) +
Imult*Ref<FONT
size=1>(InPhase,-3);
Quadrature = Ref<FONT
size=1>(Value3,-2) -
Qmult*Value3 + Qmult*Ref<FONT
size=1>(Quadrature,-2<FONT
size=1>);
//Use ArcTangent to compute the current phase
LastInPhase = LastValue<FONT
size=1>(InPhase);
if (abs<FONT
size=1>(LastInPhase + Ref<FONT
size=1>(LastInPhase,-1<FONT
size=1>))) <FONT
size=2> // <==== Problem in Ref(LastInPhase,-1)<FONT
color=#008000>
{<FONT
color=#008000 size=1>
//Phase = atan(abs((Quadrature+Ref(Quadrature,-1)) /
(InPhase+Ref(InPhase,-1))));
a=0;
}
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
Click Here
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|