Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDCandleStickLayerMBS class.
CDCandleStickLayerMBS.setColors(upFillColor as color, upLineColor as color, downFillColor as color, downLineColor as color)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 15.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The standard way to color a candlestick is to color it based on whether it is on an "up" or "down" trading session, in which "up" is defined as the closing price higher than or equal to the opening price, otherwise it is "down".
Argument | Default | Description |
upFillColor | (Mandatory) | The fill color for "up" trading sessions. |
upLineColor | (Mandatory) | The line color for "up" trading sessions. |
downFillColor | (Mandatory) | The fill color for "down" trading sessions. |
downLineColor | (Mandatory) | The line color for "down" trading sessions. |
See also:
CDCandleStickLayerMBS.setColors(upFillColor as Integer, upLineColor as Integer, downFillColor as Integer, downLineColor as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 15.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The standard way to color a candlestick is to color it based on whether it is on an "up" or "down" trading session, in which "up" is defined as the closing price higher than or equal to the opening price, otherwise it is "down".
Argument | Default | Description |
upFillColor | (Mandatory) | The fill color for "up" trading sessions. |
upLineColor | (Mandatory) | The line color for "up" trading sessions. |
downFillColor | (Mandatory) | The fill color for "down" trading sessions. |
downLineColor | (Mandatory) | The line color for "down" trading sessions. |
See also:
CDCandleStickLayerMBS.setExtraColors(upDownFillColor as color, upDownLineColor as color, downDownFillColor as color, downDownLineColor as color, leadValue as Double = -1.7E308)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 15.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The standard way to color a candlestick is to color it using the method as mentioned in CandleStickLayer.setColors, in which "up" is defined as the closing price higher than or equal to the opening price.
In some applications, it may be desirable to vary the candlestick colors based on an alternative definition of "up" and "down", in which "up" is defined as the closing price higher than or equal to that of the previous trading session.
With these two definitions of "up" and "down", a candlestick can have 4 states. It can be "up/up" ("up" as according to both the standard and alternative definitions), "up/down" ("up" according to the standard definition, "down" according to the alternative definition), "down/up" or "down/down".
The setExtraColors method can be used to configure the "up/down" and "down/down" colors. If this method is used, the colors configured with CandleStickLayer.setColors will be considered as the "up/up" and "down/up" colors.
Argument | Default | Description |
upDownFillColor | (Mandatory) | The fill color for "up/down" days. |
upDownLineColor | (Mandatory) | The line color for "up/down" days. |
downDownFillColor | (Mandatory) | The fill color for "down/down" days. |
downDownLineColor | (Mandatory) | The line color for "down/down" days. |
leadValue | [-Infinity] | The closing price before the first trading session, which is used to determine if the first trading session is "up" or "down" according to the alternative definition. |
See also:
CDCandleStickLayerMBS.setExtraColors(upDownFillColor as Integer, upDownLineColor as Integer, downDownFillColor as Integer, downDownLineColor as Integer, leadValue as Double = -1.7E308)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 15.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The standard way to color a candlestick is to color it using the method as mentioned in CandleStickLayer.setColors, in which "up" is defined as the closing price higher than or equal to the opening price.
In some applications, it may be desirable to vary the candlestick colors based on an alternative definition of "up" and "down", in which "up" is defined as the closing price higher than or equal to that of the previous trading session.
With these two definitions of "up" and "down", a candlestick can have 4 states. It can be "up/up" ("up" as according to both the standard and alternative definitions), "up/down" ("up" according to the standard definition, "down" according to the alternative definition), "down/up" or "down/down".
The setExtraColors method can be used to configure the "up/down" and "down/down" colors. If this method is used, the colors configured with CandleStickLayer.setColors will be considered as the "up/up" and "down/up" colors.
Argument | Default | Description |
upDownFillColor | (Mandatory) | The fill color for "up/down" days. |
upDownLineColor | (Mandatory) | The line color for "up/down" days. |
downDownFillColor | (Mandatory) | The fill color for "down/down" days. |
downDownLineColor | (Mandatory) | The line color for "down/down" days. |
leadValue | [-Infinity] | The closing price before the first trading session, which is used to determine if the first trading session is "up" or "down" according to the alternative definition. |
See also:
The items on this page are in the following plugins: MBS ChartDirector Plugin.