Login Page - Create Account

Support Board


Date/Time: Sun, 25 May 2025 08:58:45 +0000



Detect a SG1 displayed on chart with Formula syntax

View Count: 352

[2023-06-05 19:14:10]
Nicolas Leclercq - Posts: 22
Hi,

How can I detect a subgraph SG1 in a study with a formula syntax: example, ID16.SG1 is displayed on tha chart

...and i want to put a Trading system alert condition, with Formula syntax to trigger a trade, example : =(ID16.SG1>0) is my condition to Enter a position, but it doesnt work

Thanks

Nico
[2023-06-05 19:38:23]
j4ytr4der_ - Posts: 947
You don't need the parenthesis, though they shouldn't cause a problem. As long as ID16.SG1 is indeed returning true or false, then simply

ID16.SG1 = TRUE

or

ID16.SG1 > 0

should do it. Just make sure in the Trading System Based On Alert Condition study, you've set it to a buy or sell entry, whichever is appropriate for your needs.

Here are the Long entry input settings for one of my bots.

https://snipboard.io/HiNsTB.jpg
[2023-06-05 20:14:48]
Nicolas Leclercq - Posts: 22
Thanks for your help

It works with one SG

1/
I test with multiple SG:

=OR(AND(ID16.SG1 = TRUE,ID11.SG1=TRUE),AND(ID13.SG1=TRUE,ID11.SG1=TRUE))

and it doesn't work

2/
When the position is triggered, the TP and STOP dont display, i thought it trigger my Targets (TP and STOP) of the Trade Window
Date Time Of Last Edit: 2023-06-05 21:07:06
[2023-06-05 20:53:19]
j4ytr4der_ - Posts: 947
What exactly doesn't work? What happens? Are you certain all of those subgraphs are in fact returning true? My guess is, something isn't returning what you think it's returning.

To diagnose these things, I always check each subgraph one at a time in a spreadsheet study, just to see the returned output and make sure it's what I expect.
[2023-06-05 21:11:42]
Nicolas Leclercq - Posts: 22
Is there a way to see the values of each SG in a window via the bar menu...i dont find where i have to seek
[2023-06-05 21:13:09]
j4ytr4der_ - Posts: 947
Put each one in its own spreadsheet formula, and use the Chart Values Window to see them all at once (Window menu)
[2023-06-05 21:23:30]
Nicolas Leclercq - Posts: 22
I have tested...but nothing

spreadsheet formula:

I have tried with ID16.SG1=TRUE
I have tried with ID16.SG1>0

i dont know why Result 0 always

and i dont find where is Chart value window popup

see screenshot
Date Time Of Last Edit: 2023-06-05 21:34:44
imageSG_display.png / V - Attached On 2023-06-05 21:34:36 UTC - Size: 111.93 KB - 82 views
Attachment Deleted.

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

Login

Login Page - Create Account