Login Page - Create Account

Support Board


Date/Time: Sun, 28 Apr 2024 09:36:19 +0000



[Programming Help] - Subgraph in more regions, is it possible?

View Count: 2704

[2019-06-05 08:28:42]
User932967 - Posts: 18
In my test trading sytem based on moving averages I would like to see the moving averages wich I use for market entry/exit signals in the region 1, the main graph, while I would like to see the values of some control vectors, used for debugging and defined as subgraph, in a different region in order not to create video confusion on the main graph, is it possible?
[2019-06-05 23:44:27]
Merlin - Posts: 81
Yes, here's how:
Chart Settings: Chart Region (List) (Chart >> Chart Settings >> Regions >> Chart Region menu)
[2019-06-06 03:06:57]
Sierra Chart Engineering - Posts: 104368
First, to display the Moving Average as a line in Region 1 and other Subgraphs in another region you would need to use the Study Subgraph Reference study and change the Draw Style to what will work for what you want. These Subgraphs of the source study will need to not be drawn in that study. Refer to the documentation here for the Study Subgraph Reference study:
Study Subgraph Reference

And refer to the settings here for the Draw Style for the Subgraphs:
Chart Studies: Subgraphs Tab >> Draw Style

This may be unrelated, however:

If you want to only display certain values from the Moving Average, then refer to the following Study Collection that uses the Color Bar Based on Alert Condition to display the Bar Difference only when the Bar Difference is greater than 10. You can use this as a basis to work from:
https://www.sierrachart.com/AdditionalFiles/BarDifferenceOverValueOnLow.StdyCollct

Here are the instructions for how to use this Study Collection:
How to Use an Advanced Custom Study or a Study Collection: How to Use a Study Collection
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-06-06 03:10:53
[2019-06-06 14:52:43]
User932967 - Posts: 18
ok, in this way I can manually move the individual studies applied to the main graph in other regions.
But what I meant was different.
For study reasons, I programmed a classic Trading System based on 2 moving averages. When they are crowned on the chart an order is opened or closed, I don't go into detail because it is a classic and well-known example.
In the programmed trading system there is also a "counter", practically it is a vector of integer values, :

SCSubgraphRef CandelaSubgraph = sc.Subgraph [7];

for each new candle in the graph's time frame a routine performs a calculation.. it calculates an integer value and saves it in the vector.
The trading system that I have programmed must be able to show on the screen the 2 moving averages (and this does it regularly) but also a line that represents "CandelaSubgraph", but this one in a different region, otherwise it could not be seen since the calculated values ​​differ too much from the price of the financial instrument..
This is the meaning of my request, I hope I was clear now.
Thanks
Piero
Date Time Of Last Edit: 2019-06-06 14:55:27
[2019-06-06 15:19:50]
User932967 - Posts: 18
without the SCSubgraphRef CandelaSubgraph = sc.Subgraph [7]; (in hide mode)

https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=28986

with the SCSubgraphRef CandelaSubgraph = sc.Subgraph [7];

https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=28987

https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=28988
imagecorrect.jpg / V - Attached On 2019-06-06 15:17:17 UTC - Size: 169.36 KB - 702 views
imageregion1a.jpg / V - Attached On 2019-06-06 15:18:18 UTC - Size: 110.04 KB - 717 views
imageregion1b.jpg / V - Attached On 2019-06-06 15:19:23 UTC - Size: 186.97 KB - 710 views
[2019-06-06 15:50:45]
John - SC Support - Posts: 31159
First, you need to use the Study Subgraph Reference as stated previously to reference that subgraph (Subgraph 8).

From there you can either display the Study Subgraph Reference in another chart region, as you have stated you want to do. To do this, refer to the information here:
Chart Studies: Settings and Inputs Tab >> Chart Region

Also, note that in that same section is the information for how to overlay a study in the same region. Therefore, if you want to display the Candela subgraph in the main chart region, you would just need to follow those instructions, which basically amounts to setting the scale for the Study Subgraph Reference to Independent.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-06-06 19:33:09]
Sierra Chart Engineering - Posts: 104368
Also, make sure you set that Subgraph 8 shown in this image here:
https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=28988

to a Draw Style of Ignore.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-06-07 08:35:36]
User932967 - Posts: 18
Setting the parameters as suggested:

https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=29002
https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=29003
+ indipendent scale

I have this result chart:

https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=29001

it is not the expected result because it inserts the graphs of the 3 moving averages + the arrows indicating the entrances and exits in the wrong region, it should be the region 1, while the Candela vector now is in the right region, the 2.
It also uses the same scale in region 2 for all the lines: moving averages, arrows, Candela .. going to flatten everything.. this is because the Candela line should have a different reference system(scale) than moving averages and arrows.
However it would be enough to have only the Candela line in the region 2 and all the other lines in the region 1.. but I don't see how it can be done..
Working with the ACISIL if possible..
imagepic1.jpg / V - Attached On 2019-06-07 08:24:23 UTC - Size: 167.67 KB - 446 views
imagepic2.jpg / V - Attached On 2019-06-07 08:24:30 UTC - Size: 137.42 KB - 454 views
imagepic3.jpg / V - Attached On 2019-06-07 08:24:35 UTC - Size: 183.51 KB - 455 views
[2019-06-11 08:47:40]
User932967 - Posts: 18
News?
[2019-06-11 17:36:33]
Sierra Chart Engineering - Posts: 104368
We thought we had given sufficient information. Refer to the documentation for this here:
ACSIL Programming Concepts: Drawing Study in Two Different Chart Regions

Your trading study needs to be displayed in Chart Region 1 and have an Automatic Scale Range. You must set the Candela (subgraph 8) Draw Style to Ignore and follow the instructions above to reference it and display that Subgraph in another chart region.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-06-12 11:30:21
[2019-06-12 08:39:00]
User932967 - Posts: 18
Thanks
now it's clear and it works.
I did not understand that "Study Subgraph Reference" is itself a study included among the other studies to be applied to the chart..

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

Login

Login Page - Create Account