Support Board
Date/Time: Tue, 07 Jan 2025 20:36:43 +0000
[Programming Help] - Questions on creating a ratio study
View Count: 707
[2016-07-06 19:04:53] |
User702211 - Posts: 6 |
Hi I am trying to create a Ratio study: X variable / Y variable. However, both of X variable and Y variable will possibly change its signs to be positive or negative in real time. These will cause the Ratio becomes unstable, moving from one extreme to another extreme (e.g. from +ve zone to -ve zone in 1 bar.) I would like to add a constant to X-variables to solve it. Does Sierra Chart supports ? Or is there any tools or studies in Sierra Chart are able to handle such situations? Thank you very much for your advice and help! Date Time Of Last Edit: 2016-07-06 19:32:46
|
[2016-07-07 11:38:31] |
jackw - Posts: 57 |
You can use the 'Study Subgraph Add' study to add a constant to your X variable. You can hide the study if you don't want the result to be displayed. Then use the 'Study Subgraphs Ratio' to calculate the ratio between your Y variable and the adjusted X Variable. Note: Don't get the 'Study Subgraph...' and the 'Study Subgraphs...' studies confused with each other. |
To post a message in this thread, you need to log in with your Sierra Chart account: