Login Page - Create Account

Support Board


Date/Time: Wed, 08 May 2024 22:45:44 +0000



[Programming Help] - Price Overlay Study

View Count: 826

[2018-02-22 17:57:03]
User203925 - Posts: 40
Good day, I writing a study that is taking the moving average of a study that is on the daily chart but it's overlayed using the price overlay study on the 5 minute chart. My question is in regards to the Length. If I use a length of 10, is that 10 bars back of the time frame that the study is overlayed on (5 minute chart) or 10 bars back from the original chart (Daily Chart)? Thank you for everything you do to help users on the platform!

Joel
[2018-02-22 17:57:37]
User203925 - Posts: 40
The study I am writing is on the 5 minute chart
[2018-02-28 04:46:55]
User203925 - Posts: 40
Any help with this?
[2018-02-28 07:15:52]
User924725 - Posts: 26
By your descriptioon the 10 bar moving average that you added on the daily should overlayed preciscely on the 5min

I assume that the study you said you are ''writing'' on the 5min chart is the study price overlay and you have set it similar to photo

The example in the photo is overlaying a 20EMA of a 60min chart to a 5min chart
Date Time Of Last Edit: 2018-02-28 07:18:00
imagePrice study overlay on the 5min chart.JPG / V - Attached On 2018-02-28 07:13:46 UTC - Size: 109.71 KB - 277 views
[2018-03-02 05:17:10]
User203925 - Posts: 40
Thank you for the replay but that doesn't answer the question. In more detail, I am applying a weight and normalizing variables on 6 different studies on 6 different size charts. In order to accomplish this I have overlayed the 6 different studies onto the 5 minute chart.I am then accessing each array on each chart. After I have weighted each array, I am using the average and standard deviation to normalize the weighted array. The standard deviation and average functions both require a length. If a study is overlayed on the 5 minute chart and and I access an array in the study using sc.GetStudyArrayFromChartUsingID. I am going to then input "20" for the length in the moving average function. Is that 20 bars on the 5 minute chart which the study is overlayed onto or 20 bars back on the original chart where the study originated from?
[2018-03-02 10:19:15]
WarriorTrader - Posts: 245
I am going to then input "20" for the length in the moving average function.

There is nothing like testing it yourself. Print the results in the message log.

SCString Buffer;
Buffer.Format("%5.2d High %5.2f Low %5.2f",DistanceToOpen,HighestPrice,LowestPrice);
sc.AddMessageToLog(Buffer,0);


--WT

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

Login

Login Page - Create Account