Login Page - Create Account

Support Board


Date/Time: Wed, 24 Apr 2024 05:43:26 +0000



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

View Count: 505

[2022-05-25 23:45:28]
User422433 - Posts: 18
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: 31059
To do this use the Color Bar Based On Alert Condition study. Refer specifically to this section of the documentation for the study:
Color Bar Based on Alert Condition: Coloring Subgraphs of Other Studies
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: 18
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 - 100 views
[2022-05-26 16:41:57]
John - SC Support - Posts: 31059
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:
Chart Studies: Line From End of Chart Left to Right (ACSIL: DRAWSTYLE_LINE_FROM_END_OF_CHART_LEFT_TO_RIGHT)
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