Login Page - Create Account

Support Board


Date/Time: Thu, 18 Apr 2024 16:35:10 +0000



[User Discussion] - Offering To The Community: Scale Study to 100 Graph By Zero Line

View Count: 2337

[2015-07-26 15:19:29]
bjohnson777 (Brett Johnson) - Posts: 284
I've been programming some indicators from my base tool kit and am offering them to the community. I request they be added into the main SC distro once checked over.

From the "Display Study Documentation" button:

Scale Study to 100 Graph By Zero Line. This is a simple translator that will convert an oscillator graph with values above and below 0.0 to a 100 scale graph with 50 being the new middle line (from the previous 0.0 line). This is used to combine multiple studies on one chart and have a fixed middle point instead of several floating middle points that are hard to read.

To use this, first add one of the horizontal line studies as the base of the new chart region. I prefer "Lines 5" but at a minimum set a single line to 50.0 to be the middle of the range. Go into the Scale option, select User Defined, set Top = 100.0 and Bottom = 0.0.

Add your source study to the same chart region as the horizontal line(s) and configure your settings with all of the lines set to hidden. It is recommended to put the source study under the horizontal line study in the "Studies To Graph" list for clarity.

Add this Scale study to the same chart region. It is recommended to put the Scale study under the source study in the "Studies To Graph" list for clarity.

Use the drop down box for "Based On" and select the source study you just added. The "Input Data" lines might come up with the wrong value or go blank in the configuration box. Select each "Input Data" line and assign it a new input value from the bottom drop down box. If the source study has multiple output lines, set every one that should be visible. Note: All of the 5 lines must have a value. It doesn't matter which value the unused lines will get.

Remember that the first line to be drawn on the chart will be below all the other lines. Line 1 will be below Line 2. Line 2 will be below Line 3. Make sure to account for this in your desired order from the input box.

Set "Number Of Lines To Draw" to the number of lines you want to see on the chart. If your study only has 1 line, then leave the value at 1. If drawing all 3 lines from MACD, select 3. The remaining lines will be skipped over and not drawn.

On the Subgraphs tab, select your line(s) and assign the preferred color and line style. The rest of the lines will automatically be set to Ignore once the Scale study loads.

If adding other studies on top of this one that are already 100 scale (like Stochastic or RSI), set any horizontal lines they have to hidden to avoid those lines being drawn on top of previous graph lines.

To see the unchanged values of the original study, open the Tools Values Window and put the mouse cursor in Crosshair mode.

-----
Minor update 2016-10-15. No major function changes.
Regular compiles moved to "Brett Johnson's Standard Tool Kit" DLL.
Offering To The Community: Brett Johnson's Standard Tool Kit
Date Time Of Last Edit: 2016-10-15 06:55:04
attachmentScaleTo100ByZeroLine.cpp - Attached On 2016-10-15 06:54:46 UTC - Size: 9.17 KB - 493 views
attachmentScaleTo100ByZeroLine.dll - Attached On 2016-10-15 06:54:54 UTC - Size: 79 KB - 450 views
[2016-10-15 06:55:14]
bjohnson777 (Brett Johnson) - Posts: 284
Today's DLL was compiled with the M$VC++ change over.
You may need to update your SC version.
Keep your previous DLL version until you've tested the new compile.
Most changes were made to shut up useless M$VC++ warnings when compiling.
There are a few compile warnings left about "argument" that can be ignored.
No real functionality changes have been made.
[2019-02-04 07:29:04]
ILIM KIRGIZ - Posts: 187
Can I use this to normalize an unbounded oscillator as bounded to 0-100 scale for normalizing purposes?
Thanks.
[2019-02-04 12:03:31]
bjohnson777 (Brett Johnson) - Posts: 284
I'm not sure I'd call it "normalized", but somewhat. This study will center the oscillator on 50 and the highest peak or lowest dip will become the boundary for the scale. If there is another very large spike, all the lesser data will get smashed towards 50 on the chart. That might mess with your readings some. Use the cross-hairs in the instructions above to check the actual values.

The main purpose for this study is to show what the graph lines are doing and not exact values, so keep that in mind. There is no fixed multiplier when scaling the source study data to the 0-100 range.

If you want to try it out, the link for the main DLL is at the bottom of post 1. There are compile instructions on that page. You can compile the source code from here or for everything in the DLL.

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

Login

Login Page - Create Account