Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 19:23:54 +0000



Line slope

View Count: 646

[2021-03-11 20:40:42]
Crtfyd - Posts: 277
I have my "Trade Volume" study draw style SG1 set to auto coloring "Based on Slope" to Green for up. and Red for down.
When Im doing a "Color Based on Alert Study" and noting the slope to activate the alert, I typically use the Simple alert: ID70.SG1 < ID70.SG1[-1] to denote a down slope.

But in some studies, (this Trade Volume in particular), Ive notice the line in the study changes color while the line has the same value (ie: a level line).
Ive looked to see what cause the change in color, like a change in price, ask/bid, and I cant see anything. Besides what it is that makes it change colors for slope when there isn't any change, how would I denote that change of color in a simple alert? Obviously something changes to make the slope color change. I see in this example a "# of trades"is close to the change, but I cant see any relevance.
Regards
Private File
[2021-03-11 21:40:26]
John - SC Support - Posts: 31328
The first thing we need to know is whether the data all the way across the flat area in the Trade Volume Index is, in fact, flat. Please verify that where you have the vertical line drawn, that the value of the TVI at the bar following that line is the same as the bar where the line is drawn. We think that there is probably a very small change in value that is then causing the slope to be positive.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-03-11 22:04:55]
Sawtooth - Posts: 3990
Since that study can have consecutive level segments, you'll need this example formula to match the slope coloring of a line:
Spreadsheet Example Formulas and Usage: Formula that Matches the Slope Coloring of a Study Subgraph Line

This formula would need to be modified from spreadsheet syntax to Simple Alert syntax. Use it in the Formula field of the Spreadsheet Formula study:
=IF(OR(ID70.SG1>ID70.SG1[-1],AND(ID70.SG1[-2]>=ID70.SG1[-1],ID70.SG1>ID70.SG1[-1])),1,IF(OR(ID70.SG1<ID70.SG1[-1],AND(ID70.SG1[-2]<=ID70.SG1[-1],ID70.SG1<ID70.SG1[-1])),-1,ID1,SG1[-1]))
-where ID1 is the Spreadsheet Formula study. Hide this study.

Then use this formula on the Alerts tab of the Color Bar Based On Alert Condition study to find the transitions:
=ID2.SG1<>ID2.SG1[-1]
-where ID2 is the color bar study.
[2021-03-11 22:32:17]
Crtfyd - Posts: 277
yes, at the yellow vertical line before (red) and after (grn) the Trade Volume is 22. I even changed the value format to .001 thinking there might be minute change, but no.See added screenshot.
I dont think it matters but its a volume chart. Obviously on non small time/increments, it wouldnt show up bc of ever changing outputs. But some input has to change the color.
Is there a simple alert way to identify the color (green) instead of the "increase" in value as I have noted and is typical? Likewise red. Since typically its green when a slope is up is normally not a problem, but without any noticeable change in value,I cant see why it changes color on a level horizontal line.
imageTL.png / V - Attached On 2021-03-11 22:05:45 UTC - Size: 52.14 KB - 164 views
[2021-03-11 22:32:47]
Crtfyd - Posts: 277
Thanks for your reply. That is a bit beyond my understanding. But if I read it correctly, that is just the change in color. I need to identify "when this happens AND the slope is Green (up), then alert. It doesnt always happen WHEN the color changes. Which is why I am wondering why it changes on a level line. The output is the same before when red, as it is when green (and vice versa). changing the value point doesnt identify any small difference either. I got a partial fix by putting ID70.SG1 < ID70.SG1[-20] to show typically in the Trade Volume study that once going one way, it continues. But ultimately ive noticed that the Trade Volume when 4 points above the trade Volume LOD, and the price at the LOD, its significant. Probably bc it denotes the movement of more trades bat the ask while at the price LOD is a mover.
Attachment Deleted.
Private File
[2021-03-11 22:59:32]
Sawtooth - Posts: 3990
The long formula in post #3 produces a 1 when the line is green, and a -1 when the line is red.
The short formula in post #3 goes TRUE at each color change.

You can include another condition in the color bar formula:
=AND(ID70.SG1[-1]<22,ID70.SG1>22,ID1.SG1=1)
This will alert when the Total Volume Index goes >22 and the line is green.
[2021-03-11 23:00:32]
Sawtooth - Posts: 3990
The long formula in post #3 produces a 1 when the line is green, and a -1 when the line is red.
The short formula in post #3 goes TRUE at each color change.

You can use other conditions in the color bar formula:
=AND(ID70.SG1[-1]<=22,ID70.SG1>22,ID1.SG1=1)
This will alert when the Total Volume Index goes >22 and the line is green.
Date Time Of Last Edit: 2021-03-11 23:04:17

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

Login

Login Page - Create Account