Difference between revisions of "API Drawing styles constants"
Jump to navigation
Jump to search
(Created page with "=== Summary === The Drawing style constants are used in chart drawing functions to set the graph type <br> === Definition === {| class=wikitable cellpadding="10" style="borde...") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=== Summary === | === Summary === | ||
The Drawing style constants are used in chart drawing functions to set the graph type | The Drawing style constants are used in chart drawing functions to set the graph type. Is used with the SetIndexStyle() function. | ||
<br> | <br> | ||
=== Definition === | === Definition === | ||
Line 8: | Line 8: | ||
! Constant name !! Value | ! Constant name !! Value | ||
|- | |- | ||
| '''DRAW_LINE''' || | | '''DrawingStyle.DRAW_LINE''' || Draws the data as a line | ||
|- | |- | ||
| '''DRAW_HISTOGRAM''' || | | '''DrawingStyle.DRAW_HISTOGRAM''' || Draws the data as an histogram | ||
|- | |- | ||
| '''DRAW_FILL''' || | | '''DrawingStyle.DRAW_FILL''' || Draws the data as a filled area | ||
|- | |- | ||
| '''DRAW_ARROW''' || | | '''DrawingStyle.DRAW_ARROW''' || Draws the data as a symbol | ||
|- | |- | ||
| '''DRAW_SECTION''' || | | '''DrawingStyle.DRAW_SECTION''' || Draws the data as sections between even and odd indicator buffers, 2 buffers of values (ie: ZigZag indicator) | ||
|- | |- | ||
| '''DRAW_CANDLES''' || | | '''DrawingStyle.DRAW_CANDLES''' || Draws the data as a set of candles (ie: Heikin Ashi) | ||
|- | |- | ||
| '''DRAW_NONE''' || | | '''DrawingStyle.DRAW_NONE''' || Doesn't draw the data | ||
|} | |} | ||
=== Examples === | |||
C# code snippet : | |||
<code> | |||
public override void OnInit() | |||
{ | |||
SetIndicatorShortName("Bollinger Bands"); | |||
Indicator_Separate_Window = false; | |||
SetIndexBuffer(0, UpBand); | |||
SetIndexStyle(0, DrawingStyle.DRAW_LINE, Color.DarkOrange); | |||
SetIndexLabel(0, "Up Band"); | |||
SetIndexBuffer(1, MA); | |||
SetIndexStyle(1, DrawingStyle.DRAW_LINE, Color.DarkOrange); | |||
SetIndexLabel(1, "MA"); | |||
SetIndexBuffer(2, DownBand); | |||
SetIndexStyle(2, DrawingStyle.DRAW_LINE, Color.DarkOrange); | |||
SetIndexLabel(2, "Down Band"); | |||
} | |||
</code> |
Latest revision as of 04:17, 5 January 2023
Summary
The Drawing style constants are used in chart drawing functions to set the graph type. Is used with the SetIndexStyle() function.
Definition
Constant name | Value |
---|---|
DrawingStyle.DRAW_LINE | Draws the data as a line |
DrawingStyle.DRAW_HISTOGRAM | Draws the data as an histogram |
DrawingStyle.DRAW_FILL | Draws the data as a filled area |
DrawingStyle.DRAW_ARROW | Draws the data as a symbol |
DrawingStyle.DRAW_SECTION | Draws the data as sections between even and odd indicator buffers, 2 buffers of values (ie: ZigZag indicator) |
DrawingStyle.DRAW_CANDLES | Draws the data as a set of candles (ie: Heikin Ashi) |
DrawingStyle.DRAW_NONE | Doesn't draw the data |
Examples
C# code snippet :
public override void OnInit()
{
SetIndicatorShortName("Bollinger Bands");
Indicator_Separate_Window = false;
SetIndexBuffer(0, UpBand);
SetIndexStyle(0, DrawingStyle.DRAW_LINE, Color.DarkOrange);
SetIndexLabel(0, "Up Band");
SetIndexBuffer(1, MA);
SetIndexStyle(1, DrawingStyle.DRAW_LINE, Color.DarkOrange);
SetIndexLabel(1, "MA");
SetIndexBuffer(2, DownBand);
SetIndexStyle(2, DrawingStyle.DRAW_LINE, Color.DarkOrange);
SetIndexLabel(2, "Down Band");
}