Support Board
Date/Time: Wed, 22 Jan 2025 04:43:10 +0000
Re-color Candle Stick Bars in ACSIL Study based on price comparison
View Count: 1925
[2018-08-24 15:05:11] |
Tradix10 - Posts: 3 |
Hello, I am new to SC coding Within an ACSIL Study I would like to Re-Color candle Stick bars based on a price comparison. The Idea would be: If "High of last finished bar" > "High of last finised bar -1" then change Color of "last finished bar" to a new color (e.g. yellow). Another Example: If "Close of last finished bar" < "Close of last finised bar -1" then change Color of "last finished bar" to a new color. Im am looking for the ACSIL Code to set the Bar color. -------------------- Additional question: To get the High value of a bar I am planning to use sc.BaseData[SC_HIGH] or sc.High[sc.ArraySize] Would this code return the High of the "last finished bar?" And: sc.BaseData[SC_HIGH] or sc.High[sc.ArraySize-1] Would this code return the High of the "last finished bar -1?" Is this correct? If not, what would be the correct expression? Thank You |
[2018-08-24 19:02:50] |
Sierra Chart Engineering - Posts: 104368 |
We recommend reviewing this page to understand accessing chart bar data in ACSIL: Working with ACSIL Arrays and Understanding Looping 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 |
[2018-08-24 21:16:45] |
Tradix10 - Posts: 3 |
Thanks für your reply, there is still one open question: Within an ACSIL Study I would like to change the fill color of a candle Stick bar, based on a certain condition. The Idea is: if a certain condition is true (e.g. Price comparison etc.) THEN change the color of the candle stick bar. Im am looking for the ACSIL Code to set the Bar color. Thank You |
[2018-08-25 11:18:53] |
Sierra Chart Engineering - Posts: 104368 |
For this you just simply use one of the study Subgraphs and use this particular Draw Style: Chart Studies: Color Bar Candle Fill (ACSIL: DRAWSTYLE_COLOR_BAR_CANDLE_FILL) Have a look at this example: scsf_ColorBarAboveBelow in the studies.CPP file. 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: 2018-08-25 11:20:04
|
To post a message in this thread, you need to log in with your Sierra Chart account: