Login Page - Create Account

Support Board


Date/Time: Wed, 22 Jan 2025 18:01:56 +0000



Change color of bar forming based on whether it is higher/lower than open

View Count: 995

[2018-10-09 10:14:04]
User194713 - Posts: 27
Hi
I use a candlestick chart and want to change the color of the last bar i.e. the bar which is in the process of being built but has yet to close. However I also want to specify one colour for a bar with a high currently above the open and another color for bars forming which have a low below the open.
Can you please advise how to do this please? Many thanks
[2018-10-09 21:26:49]
John - SC Support - Posts: 37376
You need to use the Color Bar Based on Alert Condition study and have two of these, one for the Price Above and another for the Price Below. Note that I have changed your terms, as you can't really do what you have specified, as once you have a High, it always the High and the same for the Low, therefore what we put together below is when the Current Price is above the High it is one color and when the Current Price is below the Open, then it is a different color.

We have created an example of this as a Study Collection and posted it on the Additional Files section of the website. You will find the particular file here: https://www.sierrachart.com/AdditionalFiles/BarRangeTextAboveBar.StdyCollct

In order to use the file, follow the instructions here: How to Use an Advanced Custom Study or a Study Collection: How to Use a Study Collection
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account