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

Re: [amibroker] RE: [spam] Re: Indicator to highlight above MA



PureBytes Links

Trading Reference Links

--- Begin Message ---
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Indicator to highlight above MA
From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxxxxxxx>
Date: Thu, 05 Feb 2004 07:29:27 -0000
Delivered-to: mailing list amibroker@xxxxxxxxxxxxxxx
In-reply-to: <LOBBJMHOIFOLFIPFANHJOEHKFFAA.jcasavant@xxxxxxxxxxx>
List-unsubscribe: <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx>
Mailing-list: list amibroker@xxxxxxxxxxxxxxx; contact amibroker-owner@xxxxxxxxxxxxxxx
User-agent: eGroups-EW/0.82
AFL can handle 40 predefined colors, from colorBlack = 16 to 
colorWhite = 55 [and 16 custom colors].
If we use these 40 colors, we should repeat the same series after the 
39th day and every 39 days.
For this reason we may use something like this

Color=16+((BarsSince(C<MA(C,50)))%39);
Plot(C,"",1,64);
Plot(MA(C,50),"["+WriteVal(BarsSince(C<MA(C,50)),1.0)+"]",Color,1);
Title="C is above MA(C,50) the last "+WriteVal(BarsSince(C<MA
(C,50)),1.0)+" bars";

The Moving average will be colored.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> Albert,
> No need to loop if I understand your question. It should be simple
> Boolean.....
> 
> 
> x=C>MA(C,50);
> Plot(x,"Greater than MA",4,styleArea);
> 
> Regards,
> Jayson
> -----Original Message-----
> From: quantum69_70 [mailto:quantum69_70@x...]
> Sent: Friday, January 30, 2004 7:36 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Indicator to highlight above MA
> 
> 
> Hi All,
> 
> Can someone point me in the right direction on developing an
> indicator that can highlight sections of a chart that's above an MA?
> 
> I'm also hoping to be able to set criteria of highlighting secitions
> of the chart that are X number of days above the MA, and that X
> number can vary or even be different numbers with different numbers
> being highlighted as different colours. eg. 10days=yellow,
> 8days=purple, etc.
> 
> I'm looking into AFL, and it looks like I would need to do it by
> using a starting reference time which crossed MA and then looping
> forwards or backwards in time until the next time it crosses. This
> would be the obvious solution of doing this.
> 
> Any assistance would be greatly appreciated.
> 
> Albert
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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
> 
>   a.. To visit your group on the web, go to:
>   http://groups.yahoo.com/group/amibroker/
> 
>   b.. To unsubscribe from this group, send an email to:
>   amibroker-unsubscribe@xxxxxxxxxxxxxxx
> 
>   c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.


--- End Message ---