Amibroker Colors and Styles

You might also like

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 9

Custom colors refer to color user-defined palette editable using Tools->Preferences->Colors, the numerical values th

colorCustom1 = 0
colorCustom2 = 1
colorCustom3 = 2
colorCustom4 = 3
colorCustom5 = 4
colorCustom6 = 5
colorCustom7 = 6
colorCustom8 = 7
colorCustom9 = 8
colorCustom10 = 9
colorCustom11 = 10
colorCustom12 = 11
colorCustom13 = 12
colorCustom14 = 13
colorCustom15 = 14
colorCustom16 = 15

colorBlack = 16
colorBrown = 17
colorDarkOliveGreen = 18
colorDarkGreen = 19
colorDarkTeal = 20
colorDarkBlue = 21
colorIndigo = 22
colorDarkGrey = 23

colorDarkRed = 24
colorOrange = 25
colorDarkYellow = 26
colorGreen = 27
colorTeal = 28
colorBlue = 29
colorBlueGrey = 30
colorGrey40 = 31

colorRed = 32
colorLightOrange = 33
colorLime = 34
colorSeaGreen = 35
colorAqua = 35
colorLightBlue = 37
colorViolet = 38
colorGrey50 = 39

colorPink = 40
colorGold = 41
colorYellow = 42
colorBrightGreen = 43
colorTurquoise = 44
colorSkyblue = 45
colorPlum = 46
colorLightGrey = 47

colorRose = 48
colorTan = 49
colorLightYellow = 50
colorPaleGreen = 51
colorPaleTurquoise = 52
colorPaleBlue = 53
colorLavender = 54
colorWhite = 55

You can also use new 24-bit (full color palette) functions ColorRGB and ColorHSB

You can easily plot multi colored charts using both Plot functions. All you need to do is to define array of color index
In the following example MACD is plotted with green color when it is above zero and with red color when it is below

dynamic_color = IIf( MACD() > 0, colorGreen, colorRed );


Plot( MACD(), "My MACD", dynamic_color );

In addition to defining the color we can supply 4th parameter that defines style of plot. For example we can change

dynamic_color = IIf( MACD() > 0, colorGreen, colorRed );


Plot( MACD(), "My MACD", dynamic_color, styleHistogram | styleThick );

As you can see, multiple styles can be combined together using | (binary-or) operator. (Note: the | character can be

To plot candlestick chart we are using styleCandle constant, as in this example:

Plot( Close, "Price", colorBlack, styleCandle );

To plot traditional bars with color (green up bars and red down bars) we just specify color depending on relationship
Plot( Close, "Price", IIf( Close > Open, colorGreen, colorRed ), styleBar | styleThick );

All available style constants are summarized in the table below.

Style constants
Style is defined as a combination (using either addition (+) or binary-or (|) operator) of one or more following flags (

styleLine = 1 - normal (line) chart (default)


styleHistogram = 2 - histogram chart
styleThick =4 - fat (thick)
styleDots = 8 - include dots
styleNoLine = 16 - no line
styleDashed = 32 - dashed line style
styleCandle = 64 - candlestick chart
styleBar = 128 - traditional bar chart
styleNoDraw = 256 - no draw (perform axis scaling only)
styleStaircase = 512 - staircase (square) chart
styleSwingDots = 1024 - middle dots for staircase chart
styleNoRescale = 2048 - no rescale
styleNoLabel = 4096 - no value label
stylePointAndFigure = 8192 - point and figure
styleArea = 16384 - area chart (extra wide histogram)
styleOwnScale = 32768 - plot is using independent scaling
styleLeftAxisScale = 65536 - plot is using left axis scale (independent from right axis)
styleNoTitle = 131072 - do not include this plot value in title string
styleCloud = 262144 - paint a "cloud" (filled area) chart (see examples below)
styleClipMinMax = 524288 - clip area between Min and Max levels defined in Plot statement. (Note: this style is not
styleGradient - (new in 5.60) - gradient area chart. Upper gradient color is specified by color parameter in Plot() func
>Colors, the numerical values that appear after = (equation) mark are for reference only and you don't need to use them. Use just the nam
o is to define array of color indexes.
d with red color when it is below zero.

lot. For example we can change previous MACD plot to thick histogram instead of line:

or. (Note: the | character can be typed by pressing backslash key '\' while holding down SHIFT key). Resulting chart looks like this:

color depending on relationship between open and close price and styleBar in style argument:
of one or more following flags ( you can use predefined style__ constants instead of numbers)

atement. (Note: this style is not compatible with most printers)


by color parameter in Plot() function, bottom gradient color is either background color or can be defined using SetGradientFill function. sty
d to use them. Use just the name such as colorDarkGreen.
ng chart looks like this:
sing SetGradientFill function. styleGradient can be combined with styleLine

You might also like