Login Page - Create Account

Support Board


Date/Time: Tue, 28 Jun 2022 23:53:36 +0000



Color current price line based on price relation to current candle open?

View Count: 76

[2022-05-25 23:45:28]
User422433 - Posts: 15
Is it possible to color the current price line based on if current price is above or below current candle open like in tradingview?
[2022-05-26 14:18:52]
John - SC Support - Posts: 17012
To do this use the Color Bar Based On Alert Condition study. Refer specifically to this section of the documentation for the study:
https://www.sierrachart.com/index.php?page=doc/StudiesReference.php&ID=245&Name=Color_Bar_Based_on_Alert_Condition#ColoringSubgraphsOfOtherStudies
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-05-26 15:24:12]
User422433 - Posts: 15
I added 2 Color Bar Based On Alert Condition studies. For the first I use alert formula
=ID1.SG1 > O
and the other
=ID1.SG1 < O
ID1.SG1 is referencing the subgraph of the current price line study. The result is attached. It looks like the formula is evaluated for the CPL at each bar. You can also see where the bar is extending forward there is no coloring.

Is it possible to color the entire line based on the last bar in the chart, including the portion of the line that is forward of the last bar?
Date Time Of Last Edit: 2022-05-26 15:28:35
imagesierracpl.PNG / V - Attached On 2022-05-26 15:20:14 UTC - Size: 10.25 KB - 17 views
[2022-05-26 16:41:57]
John - SC Support - Posts: 17012
The solution to coloring the forward area also will resolve the issue of testing against each bar. The way to do this would be to have the Color Bar Based on Alert Condition overwrite what is drawn by the Current Price Line study. To do this set the Draw Style for the Color Bar Based on Alert Condition to be Line from End of Chart Left To Right. Refer to the following:
https://www.sierrachart.com/index.php?page=doc/ChartStudies.html#DrawStyle_LineFromEndOfChartLeftToRight
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