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

[amibroker] Relative referencing in arrays



PureBytes Links

Trading Reference Links

Dimitris & Graham,

Thanks for the lesson that was just what I hoped for. It never occurred to
me that the == is a binary condition;
and so shapeUpArrow*D1C applies the arrow when D1C is 1.

What I'm trying to do is a system where some following bar is dependent on
some previous bar with a certain condition. So I tried to put tags on the
specified bars but didn't succeed.  My present attempt is to go forward from
bar to bar. The next problem will be how to eliminate redundant bars. Sort
of make it a "cross" function and not a ">" function. Hope I'm clear.

Herbert


----- Original Message ----- 
From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, February 02, 2004 1:24 PM
Subject: [amibroker] Re: What's wrong?


> a. Your D1L is a [binary] condition. It is equal to 1 when L==LLV
> (L,10) and is equal to 0 when L is not LLV(L,10).
> What would be the meaning of L<D1L you use in the next line ?
> It is L<1 or L<0, both false for stock prices greater than $1.
> b. The same for the next L<D1C , L is a price, D1C is a condition
> c. If you want the close of day1, then you should write
> D1C=ValueWhen(D1L,C,1);
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "hertyil" <herty@xxxx> wrote:
> > Hi fellows,
> > I'll appreciate help with this. Why doesn't D2C get plotted in the
> > following code? D2 or D2C are incorrect, why?
> >
> > D1L=L==LLV(L,10);
> > D1C=C==ValueWhen(D1L,C,1);      /* close of Day 1 */
> > D2=BarsSince(D1L)>8 AND L<D1L OR L<D1C OR C<D1C;  /* condition for
> > Day 2 */
> > D2C=C==ValueWhen(D2,C,1); /* close for day 2  */
> >
> > Plot(C,"",1,128);
> > PlotShapes(IIf(D1C,shapeUpArrow,shapeNone) ,colorBrightGreen);
> > PlotShapes(IIf(D2C,shapeUpArrow,shapeNone) ,colorBlue);
> >
> > Herbert
>
>
> 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/
>
>
>



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 ---------------------~-->
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
---------------------------------------------------------------------~->

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/