TradeStation allows you to specify colors in 3 different ways when you're offered an input. Of course, you can use the Color tab of an indicator that plots by selecting the color. But when the color is controlled algorithmically, meaning by the program, then inputs are often used to determine the colors used.
The base 16 colors that you can specify by name are:
Black
Blue
Cyan
Green
Magenta
Red
Yellow
White
DarkBlue
DarkCyan
DarkGreen
DarkMagenta
DarkRed
DarkBrown
DarkGray
LightGray
In many indicators that use inputs to determine color, you can get a larger choice of colors by using a function that describes the color rather than one of the 16. The 2 functions are mycolors and rgb.
mycolors("colorname") allows you to specify an "html" color name. Most of the named colors on the page at the following link will work. For example, if you wanted to use the color named, CornflowerBlue, you would specify it as
mycolors("CornflowerBlue")
Note that there's no space between the words.
https://help.tradestation.com/09_01/tsdevhelp/Subsystems/elobject/class_win/color_class.htm
Alternatively, you can specify the Red, Green and Blue portions of the color if you know the quantity of each. The same link above will give you the amounts of red, green, and blue to use (each one is from 0-255 in range). So to get the same CornflowerBlue color using RGB, you could find the entry in the table on the linked page, and give the color as follows:
rgb(100, 149, 237)
You can find more colors by googling "rgb blue colors" and looking for the Decimal numbers to use.
So in summary, you have three ways to specify colors when they're an input: you can specify just the base color name, or use the mycolors or rgb format to specify many more colors.
Comments
0 comments
Article is closed for comments.