Support Board
Date/Time: Sun, 12 Jan 2025 09:51:45 +0000
Can a custom function return a color?
View Count: 824
[2017-02-03 23:04:32] |
reticent67 - Posts: 4 |
I'm coding a trading strategy based on several custom studies. I want to evaluate the studies and based on certain conditions, plot a subgraph for my strategy. It would be easier to make a helper function return a color that can directly be assigned to the subgraph rather than have my helper function return an integer and use a switch to color the subgraph. Is this possible in SC? Example: subgraph[1].DataColor[sc.Index] = calcCustomStudy(params)
|
[2017-02-04 01:30:16] |
Sierra Chart Engineering - Posts: 104368 |
Yes. Because a color value which is a COLORREF type is nothing more than a 4 byte unsigned integer. Use the Windows RGB(R,G,B) macro to create this value. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2017-02-04 01:31:28
|
To post a message in this thread, you need to log in with your Sierra Chart account: