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

Re: [amibroker] Plot values to 4 dec places



PureBytes Links

Trading Reference Links

Andrew,

First you need to go to 
Tools->Preferences->Misc
and adjust "decimal places in chart titles"
setting here

It will appear in your own indicators, only if you do NOT
format the title yourself.
In other words it will display user-defined number of places
if you are using _DEFAULT_NAME() in your own indicators.

Like this

_SECTION_BEGIN("Price"); 
SetChartOptions(0,chartShowArrows|chartShowDates); 
_N(Title = "{{NAME}} - {{INTERVAL}} {{DATE}} {{OHLCX}} {{VALUES}}" ); 
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END(); 

_SECTION_BEGIN("MA"); 
P = ParamField("Price field",-1); 
Periods = Param("Periods", 15, 2, 200, 1, 10 ); 
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END(); 

_SECTION_BEGIN("MA1"); 
P = ParamField("Price field",-1); 
Periods = Param("Periods", 15, 2, 200, 1, 10 ); 
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END(); 



If you hard-code the title using WriteVal( something, 1.2 ) it will
do as you instructed it to do - i.e. will display 2 digits regardless of preferences settings.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Andrew Z" <wizard@xxxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, September 10, 2005 8:17 AM
Subject: [amibroker] Plot values to 4 dec places


> G'day all,
> 
> When I plot one of my own indicators how do I get it to show 4 decimal 
> places when it shows it's value in the title line, instead of just 2 
> decimal places??
> 
> Thanks,
> Andrew.
> 
> 
> 
> 
> 
> 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 --------------------~--> 
Make a difference. Find and fund world-changing projects at GlobalGiving.
http://us.click.yahoo.com/PcNrnD/PbOLAA/cosFAA/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/