Standard Deviation values – Multiple Time Frames


Category:
0
0

Hey Pete – I’m interested in a study that is like a combination of concepts: Pivots and Standard Deviation Channels (SDC). I want to be able to plot the value of the daily SDC lines at the open to be plotted horizontally across any timeframe chart, in the same fashion as pivots.  So I could look at a 5min chart, and see 5 horizontal lines that represent where the SDCs would start at the opening. If possible I’d like to be able to adjust the kind of line/color of the line so that I can add the same study but for a 4hr SDC as well.

Is this doable?

Marked as spam
Posted by (Questions: 3, Answers: 1)
Asked on November 2, 2020 8:05 pm
393 views
0
Private answer

I see that you are referencing a study named "Standard Deviation Channels" and "SDC". The closest match I find in Thinkorswim is named "StandardDevChannel". If this is the study you are referring to then the answer is no. That study uses a function named "InertiaAll()". It is only able to compute it's values from every bar on the chart. Change the amount of historical data loaded on the chart and the lines change completely. It also means this study is completely incapable of computing a value for the open and extended that value in horizontal lines across the chart.

In summary, the StandardDevChannel study in Thinkorswim is only useful for training your eyes to see the overall trend. It is completely useless for any other application.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on November 2, 2020 8:48 pm
0
Pete, After many mos "we" have an ACCURATE WORKING MTF Stand Dev channel,the only hiccup is that Length must be input for ea stock. Your commenting system will not allow me to post anything greater than 1000characters(actually flagging me for less than a 1000!) so I cant give you bare bones info, is there an email I can send you my question?
( at February 9, 2022 11:53 am)
0
There reason there is a character limit is to prevent folks from posting code that is far too complex to be evaluated in the Q&A Forum. Given the length of your code I suspect there is no way I can provide the solution you are seeking. I only allocate 15 minutes to each free solution I provide in this forum.
( at February 9, 2022 2:22 pm)
0
Actually its not that many lines/nor complex... My question to you: Is there a way to use the bar count script to input the length "automatically” while factoring in the aggregation period (ex DAY, FOUR_HOURS, etc) so you can just load the study and it runs accurately?? Here’s the script for the bar count: def BN = BarNumber(); AddLabel(yes,BN, color.DARK_ORANGE); input DayLength = 252; input FourHourLength = 903; (changes depending on stock) def DayRegression = Inertia(close(period = aggregationPeriod.DAY), DayLength); def DayStdDev = stdev(close(period = aggregationPeriod.DAY), DayLength); def FourHourRegression = Inertia(close(period = aggregationPeriod.FOUR_HOURS), FourHourLength); def FourHourStdDev = stdev(close(period = aggregationPeriod.FOUR_HOURS), FourHourLength);
( at February 9, 2022 6:01 pm)
0
I seriously doubt his is possible. The Inertia() functions will require a fixed value for the length parameter. If you try to compute a value that changes based on which ticker symbol is loaded on the chart you will get a compiler error. In your example code, DayLength and FourHourLength must remain fixed values.
( at February 9, 2022 6:19 pm)