Login Page - Create Account

Support Board


Date/Time: Tue, 23 Apr 2024 07:23:02 +0000



Text on chart based on Study value

View Count: 1390

[2018-07-20 17:12:52]
NRGTrader - Posts: 351
What is the best method to place text on chart based on a chart study. For example, (IF ID17.SG1<Y TEXT1, IF ID17.SG1>Y,<=X TEXT2, IF ID17.SG1>=Z TEXT3)
[2018-07-23 19:27:16]
NRGTrader - Posts: 351
I found this post that will satisfy one condition, but is there any way to nest conditions in one study?

Text based on Alert Condition
[2018-07-23 21:05:03]
John - SC Support - Posts: 31027
That thread is the basis for what you need to do. We also just updated the documentation to give the instructions for how to create the alert condition for that thread. This can be found here:
https://www.sierrachart.com/index.php?page=doc/StudiesReference.php&ID=334&Name=Text_Display_For_Study#Example_DisplayingTextBasedOnAlertCondition

Since you want to have specialized text for each condition, you would need to create 3 pairs of Color Bar Based on Alert Condition and Text Display for Study studies. We have attached an example study collection for you based on the post that you reference.

Refer to the following for how to use the Study Collection:
Study Collections: Using a Study Collection Provided by Sierra Chart Support

Also, just for completeness, it is possible to nest IF statements together, although from what we see, this would not work in this case. For example =IF(A > B, 1, IF(B > C, 2, 3)) would give you 1 if A is Greater than B, 2 if B is Greater than C and A is NOT Greater than B or 3 if the first two conditions are not true.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
attachmentDifferentTextDisplays.StdyCollct - Attached On 2018-07-23 21:02:26 UTC - Size: 65.32 KB - 526 views
[2018-07-24 10:58:13]
NRGTrader - Posts: 351
Thank you for the example John. I'll give that a try and adapt.

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

Login

Login Page - Create Account