Thanks Prashanth,
I better start learning the AFL language now.
RegardsInfinity

--- On Thu, 17/6/10, Prashanth <prash454...@gmail.com> wrote:

From: Prashanth <prash454...@gmail.com>
Subject: Re: [amibroker] Re: Request Is there any afl greencolor for bullish  
zone and red for bearish
To: amibroker@yahoogroups.com
Date: Thursday, 17 June, 2010, 7:41 PM















 
 



  


    
      
      
      Plot(Cond1, "RSI", Colors, styleHistogram);



Cheers



Prashanth



----- Original Message ----- 

From: Infinity Home Loans

To: amibroker@yahoogroups.com

Sent: Thursday, June 17, 2010 19:29 PM

Subject: Re: [amibroker] Re: Request Is there any afl greencolor for bullish 

zone and red for bearish



Hi Prashanth,



Thanks for the help.

However, I need it in a histogram format rather than a line format.



How do we change it?



Regards

Infinity



--- On Thu, 17/6/10, Prashanth K <prash454...@gmail.com> wrote:



From: Prashanth K <prash454...@gmail.com>

Subject: Re: [amibroker] Re: Request Is there any afl greencolor for bullish 

zone and red for bearish

To: amibroker@yahoogroups.com

Date: Thursday, 17 June, 2010, 1:40 PM



Is this what you are looking for?



// Color coded RSI



_SECTION_BEGIN("RSI oscillator");

/* CBDerivative */

/* Set Scaling to Automatic, Show dates On, Percent On, Middle On */



Cond1 = (EMA(EMA(RSI( 14),5),3) )-(MA(EMA( EMA(RSI(14) ,5),3),9) );



UpTrend = Cond1 >  0;

DnTrend = Cond1 < 0;



Colors = IIf(UpTrend, colorGreen, IIf(DnTrend, colorRed, colorBlack)) ;



Plot(Cond1, "RSI", Colors, styleLine);



Cheers



Prashanth



On Thu, Jun 17, 2010 at 12:44 PM, Infinity Home Loans <infynh...@yahoo. com> 

wrote:



Hi Mike,



I am done with color coding RSI.

But this particular code is giving me problems:



_SECTION_BEGIN("RSI oscillator");

/* CBDerivative */

/* Set Scaling to Automatic, Show dates On, Percent On, Middle On */



Graph0= (EMA(EMA(RSI( 14),5),3) )-(MA(EMA( EMA(RSI(14) ,5),3),9) );



Graph0Style = 6;

Graph0Color = 6;



UpTrend = Graph0 > 0;

DnTrend = Graph0 < 0;



Colors = IIf(UpTrend, colorGreen, IIf(DnTrend, colorRed, colorBlack)) ;



The colors are not working.



Regards

Infinity



--- On Thu, 17/6/10, Mike <sfclimb...@yahoo. com> wrote:



From: Mike <sfclimb...@yahoo. com>

Subject: [amibroker] Re: Request Is there any afl greencolor for bullish 

zone and red for bearish

To: amibro...@yahoogrou ps.com

Date: Thursday, 17 June, 2010, 12:19 AM



It's covered in the user guide:



http://www.amibroke r.com/guide/ h_indbuilder2. html



Mike



--- In amibro...@yahoogrou ps.com, Infinity Home Loans <infynh...@.. .> 

wrote:

>

> Hi Mike,

> Now, can we extend this particular color coding to indicators too.I mean, 

> is it possible to color RSI if it is placed at or above 65 or at or below 

> 40.

> In the same manner, if I have a oscillator which is plotted as a 

> histogram... then can we color code it for above and below zero line.

> Thanks again.

> RegardsInfinity

>

> --- On Wed, 16/6/10, Mike <sfclimb...@. ..> wrote:

>

> From: Mike <sfclimb...@. ..>

> Subject: [amibroker] Re: Request Is there any afl greencolor for bullish 

> zone and red for bearish

> To: amibro...@yahoogrou ps.com

> Date: Wednesday, 16 June, 2010, 12:02 PM

>

>

>

>

>

>

>

>

>

>

>

>

>

>

>

>

> Â

>

>

>

>

>

>

>

>

>

>

> Hi,

> If you want the colors to apply to the price instead of the background, 

> then you have to use them in the Plot for the price. Bars can be made 

> thick simply by including styleThick.

> Highs = EMA(High, 5);

>

> Lows = EMA(Low, 5);

>

>

>

> UpTrend = C > Highs;

>

> DnTrend = C < Lows ;

>

> Colors = IIf(UpTrend, colorGreen, IIf(DnTrend, colorRed, colorBlack)) ;

>

>

>

> Plot(Close, "Price", Colors, styleBar | styleThick);

>

> Plot(Highs, "Highs", colorBlue, styleLine);

>

> Plot(Lows, "Lows", colorYellow, styleLine);Â

>

> Mike

> --- In amibro...@yahoogrou ps.com, "infynhome" <infynhome@ .> wrote:

> >

> > Hi Mike,

> >

> > I have tried to incorporate the formula as per my definition of a trend. 

> > The formula that I am trying to use is as follows:

> >

> > Fast = EMA(High, 5);

> > Medium = EMA(Low, 5);

> >

> >

> > Plot(Close, "Price", colorBlack, styleBar);

> > Plot(Fast, "Fast", colorDarkGreen, styleLine);

> > Plot(Medium, "Medium", colorYellow, styleLine);

> >

> > UpTrend = C > Fast;

> > DnTrend = C < Medium ;

> > Colors = IIf(UpTrend, colorGreen, IIf(DnTrend, colorRed, 

> > colorLightGrey) );

> >

> > Plot(1, "", Colors, styleOwnScale | styleArea | styleNoLabel, 0, 1, 

> > 0, -1);

> >

> > Now, there are a couple of problems with this formula.

> > 1. Instead of getting colored bars, I am getting a colored background.

> > 2. Secondly, I want these bars to be thick.

> > 3. I am not sure how to get results for my 3rd condition.

> >

> > My trend system is as follows:

> >

> > I use 5 period EMA's of Highs and Lows.

> > Now, if price close is above 5 period EMA high, then the bar should be 

> > colored green. If the price is above 5 period EMA low, then the bar 

> > should be colored red.

> > If the price close is between these 2 ema's then the bar should be 

> > colored black.

> >

> > Please provide a solution. Thanking you in anticipation.

> >

> > Regards

> > Infinity

> >

> > --- In amibro...@yahoogrou ps.com, "Mike" sfclimbers@ wrote:

> > >

> > > Here's one way to do it. Substitute your own definition of trend.

> > > Fast = MA(Close, 5);

> > > Medium = MA(Close, 25);

> > > Slow = MA(Close, 50);

> > >

> > > Plot(Close, "Price", colorBlack, styleBar);

> > > Plot(Fast, "Fast", colorDarkGreen, styleLine);

> > > Plot(Medium, "Medium", colorYellow, styleLine);

> > > Plot(Slow, "Slow", colorDarkRed, styleLine);

> > >

> > > UpTrend = Fast > Medium && Medium > Slow;

> > > DnTrend = Fast < Medium && Medium < Slow;

> > > Colors = IIF(UpTrend, colorGreen, IIF(DnTrend, colorRed,

> > > colorLightGrey) );

> > >

> > > Plot(1, "", Colors, styleOwnScale | styleArea | styleNoLabel, 0, 1, 0,

> > > -1);

> > > Mike

> > > --- In amibro...@yahoogrou ps.com, "rvlv" <rvlv@> wrote:

> > > >

> > > >

> > > > Hi experts

> > > >

> > > > I remember having seen an afl

> > > > the chartspace is showing green color while price is uptrend and the

> > > chart area gets red color if price becomes downtrend, and area gets 

> > > ash

> > > or grey color if price bars have no trend

> > > >

> > > > I am talking of chart area from top to bottom

> > > >

> > > > thanks for help

> > > > regards

> > > > rv

> > > >

> > >

> >

>





    
     

    
    


 



  










Reply via email to