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

RE: [amibroker] Help With Code



PureBytes Links

Trading Reference Links

Hi Graham

Thanks for this however it unfortunately didn't do what I was trying to
achieve.  

I have attached a channel period chart which broadly outlines what I am
trying to achieve using the code below. 

Hopefully, you can assist me further with this.

Many thanks

Ken

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Graham
Sent: Monday, 13 February 2006 3:58 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Help With Code

try this, assuming it is the plot of RR you wanted to colour

RRcolor = iif( RR>0, colorbrightgreen,colorred);
Plot(rr,"RISK RATIO", RRcolor,styleLine|styleDots);


--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm


On 2/13/06, Ken Henderson <kjh@xxxxxxxxxxxxxxx> wrote:
> Hi
>
> Can anyone help me with the code below ?
>
> What I would like to do is insert a different colour above and below the
"0
> line" instead of plotting the 0 line.
>
> Many thanks in advance.
>
> Ken
>
>
>
> _SECTION_BEGIN("riskratio");
> //risk ratio is the annualized daily return divided by the annualized
> standard deviation. risk ratio = rr
> //dailyreturn = dr
> //annualized daily return = drpa
> //annulaized stdev = sdpa
>
> dr=log(Close/Ref(Close,-144));
> drpa=MA(dr,6)*1000;
> sdpa=StDev(dr,2253)*sqrt(2253);
> rr=drpa/sdpa;
> Plot(rr,"RISK RATIO", colorBrightGreen,styleLine|styleDots);
> Plot(0,"",colorYellow,styleLine|styleThick|styleDots);
> _SECTION_END();
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links



 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/
 

Attachment: Chart.png
Description: PNG image