Welcome Features News Download Registration Support FAQ Wish list Links
Advanced stock charting and analysis program

A-Z Index | Category Index |

SETCHARTOPTIONS
- set/clear/overwrite defaults for chart pane options

Exploration / Indicators
(AFL 2.70)


SYNTAX SetChartOptions( Mode = 0, Flags = 0, gridFlags = chartGridMiddle, ymin = 0, ymax = 0 )
RETURNS NOTHING
FUNCTION Allows to set/clear/overwrite/set defaults for chart pane options
  • Mode - specifies how options are set:
    • 0 - set only the DEFAULT values for new chart. Defaults are applied only once when chart is inserted in a new pane, so later you can modify any option using Indicator Builder
    • 1 - overwrite - the values specified in 2nd and 3rd argument overwrite any previously set values
    • 2 - set flag - flags specified in 2nd and 3rd parameter are binary-ORed with the current values, so effectively these options are set while remaining are unchanged
    • 3 - reset flag - flags specified in 2nd and 3rd parameter are cleared while the others remain unchanged.
  • Flags - allowable flags are:
    chartShowDates, chartLogarithmic, chartShowArrows, chartWrapTitle (4.75 or higher), chartHideQuoteMarker (v5.06). chartHideQuoteMarker - hides the quote selector line on per-pane basis, the same as Parameter dialog -> Axes & Grid -> Vert. quote marker: Show/Hide
  • gridFlags - (for internal AmiBroker use - do not use it in your own coding as this parameter will be eventually removed) allowable values are: chartGridDiv100, chartGridPercent, chartGridDiv1000, chartGridMargins chartGridMiddle, chartGrid0, chartGrid30, chartGrid70, chartGrid10, chartGrid90, chartGrid50,chartGrid100,chartGrid20,chartGrid80,chartGrid1
  • ymin, ymax - (new in 5.07) these parameters specify Y-axis minimum and maximum values for custom scaling. If you specify any values that meet the condition ymin < ymax, AmiBroker will turn OFF automatic scaling and use specified min/max values for Y scale. Note that Mode argument controls when these settings are applied (0 - only when new chart is created, 1 - always), when modes 2 and 3 are used - scaling is not changed.
EXAMPLE //to mark "Show arrows" by default in a new chart use
SetChartOptions( 0, chartShowArrows );

Example 2 (works only with version 4.75 or higher):

SetChartOptions(2, chartWrapTitle );
Title="this is a test of automatic wrapping of title text that is too long to fit in single line, for that reason this sample formula uses very long text. I hope you are enjoying the sample";

SEE ALSO

References:

The SetChartOptions function is used in the following formulas in AFL on-line library:


 


About | Privacy | Terms of Use | Contact information
Copyright © 2003 AMIBROKER.COM