PureBytes Links
Trading Reference Links
|
Johan,
Thanks. your suggestion got me past that point ... now to see if what kind
of results this produces.
Will post later if useful
Ara
----- Original Message -----
From: "johsun" <johanskatt@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, February 23, 2004 12:35 PM
Subject: [amibroker] Re: AFL - Translatin TS code
> Don't think you can use Ref here, try using subscript operator,
> something like
>
> xxx=LastValue(BarIndex());
>
> if (abs(InPhase[xxx] + InPhase[xxx-1]))
>
>
> Johan
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxxx> wrote:
> > The code below gives me an error of:
> > Error 3.
> > Condition in IF, WHILE, FOR statements
> > has 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;
> >
> > Imult =0.635;
> >
> > Qmult =0.338;
> >
> > InPhase =0;
> >
> > Quadrature =0;
> >
> > Phase =0;
> >
> > DeltaPhase =0;
> >
> > count =0;
> >
> > InstPeriod =0;
> >
> > Period =0;
> >
> > Trendline =0;
> >
> >
> >
> > if (LastValue(BarIndex()) > 5)
> >
> > //Detrend Price
> >
> > {Value3 = Price - Ref(Price,-7);}
> >
> >
> >
> > //Compute InPhase AND Quadrature components
> >
> > Inphase = 1.25*(Ref(Value3,-4) - Imult*Ref(Value3,-2)) + Imult*Ref
> (InPhase,-3);
> >
> > Quadrature = Ref(Value3,-2) - Qmult*Value3 + Qmult*Ref(Quadrature,-
> 2);
> >
> > //Use ArcTangent to compute the current phase
> >
> > LastInPhase = LastValue(InPhase);
> >
> > if (abs(LastInPhase + Ref(LastInPhase,-1))) //
> <==== Problem in Ref(LastInPhase,-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 Links
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
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 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:
http://docs.yahoo.com/info/terms/
|