Support Board
Date/Time: Fri, 07 Feb 2025 18:21:38 +0000
[Programming Help] - condition between delta number and movement in chart
View Count: 1394
[2021-10-29 20:19:43] |
User278398 - Posts: 291 |
Hello, there is an option to take take the delta number (that i have for example in "numbers bars calculated" study) and give it condition for his color text/color backgroud, depend if the stick bar is go up (green) or go down (red) in the chart ? i dont care if i can see it by "study subgraph above/below bar as text" study or in any other option. regrds |
[2021-11-01 15:36:14] |
User278398 - Posts: 291 |
?
|
[2021-11-04 16:07:28] |
User278398 - Posts: 291 |
there is times that i can wait without an answer... if there is no option for what i aske for, so tell me that. |
[2021-11-04 16:53:28] |
Sawtooth - Posts: 4173 |
There is usually a way to do most things in Sierra Chart. Please explain in more detail what you want to do. |
[2021-11-05 10:32:46] |
User278398 - Posts: 291 |
thank u for your response. in the photo i attached u can see an example for what im looking for. i want a mark on the chart candle when the delta number (positive/negative) is different from the color of the candle stick in the chart. (for example, if the delta number is positive (green color) and the candle stick is "negative" (red color, go relative down), then i will see a mark on the chart (like in the example attached photo)... |
[2021-11-05 14:32:56] |
Sawtooth - Posts: 4173 |
Try this: Add the Color Bar Based On Alert Condition study - Set the 'Output When Condition True' to 'Use Input Data' - Set the 'Input Data' to High - Set 'Draw Style...Offset' to 50 - Set the 'Draw Style Offset Type' to Percentage - On the Subgraphs tab, set the Draw Style of SG1 to Point, Width/Size 5. - On the Alerts tab, use a formula like this: =OR(AND(ID2.SG1>0,C<O),AND(ID2.SG1<0,C>O)) where ID2 is the Numbers Bars Calculated Values study; edit ID# as needed. Color Bar Based on Alert Condition: Drawing Arrows/Text or Other Styles at the High or Low of Bars Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables |
[2021-11-05 16:36:40] |
User278398 - Posts: 291 |
VERY NICE SOLUTION! YOUR Equation LOOKS GOOD, BUT I DONT GET A GOOD VALUES. (i try allso with color background based on alert, study and i got the same resuls) *PICE ATTACHED |
Attachment Deleted. |
[2021-11-05 17:24:09] |
User278398 - Posts: 291 |
i found the problem. =ID42.SG1>0 work good with displacement set to -1 (in subgraphs) and =c>o work good when displacement set to 0 (in subgraphs)... how can i write the formula for Delta that the displacement will be to 0 (and not to -1) ? Date Time Of Last Edit: 2021-11-05 17:40:00
|
[2021-11-05 18:48:25] |
Sawtooth - Posts: 4173 |
how can i write the formula for Delta that the displacement will be to 0 (and not to -1) ?
There is no need to set the Displacement to anything other than 0.Which SG# of the Numbers Bars Calculated Values study are you using for your 'Delta' ? |
[2021-11-06 08:31:16] |
User278398 - Posts: 291 |
sg1
|
[2021-11-06 14:10:54] |
Sawtooth - Posts: 4173 |
As a test, change your data feed to SC Data - All Services and in Chart Settings, change the Symbol to ESZ21-CME This setup works accurately for me. |
[2021-11-06 15:57:40] |
User278398 - Posts: 291 |
thank u for your solution. i tried something else for now and it is work good (with reference for 1 bar before, for the delta number) =or((and(ID2.SG1[1]<0,c>o)),(and(ID2.SG1[1]>0,c<o))) |
To post a message in this thread, you need to log in with your Sierra Chart account: