Support Board
Date/Time: Mon, 25 Nov 2024 02:29:27 +0000
Study/Price Overlay Study, calculate at bar close only.
View Count: 325
[2024-04-04 20:10:51] |
jeden8l - Posts: 47 |
Good afternoon John. I need the Study/Price Overlay Study to calculate at source chart bar close only, not intra-bar. I went through a couple of threads saying that you don't support this option for any of the studies since its easily done through ACSIL function. However, there is no ACSIL source code for this study available. I don't really want to play around with alerting studies, it adds latency to the whole process. What would be your advise in this case? |
[2024-04-04 21:44:56] |
John - SC Support - Posts: 36238 |
There is not a direct solution for what you want to do. The Sierra Chart studies are not setup to have the ability to only calculate at a certain times, specifically none have the ability to only calculate on Bar Close. You are correct, it can be done with a Custom Study, and the source code for our Study/Price Overlay is not available. Our recommendation would be to see if you can get what you want by using the "Color Bar Based on Alert Condition", but you state you do not want to do this. In which case, the only option left is to create your own study. Refer to the following to get you a start: sc.GetStudyArrayFromChart() List of Third Party Sierra Chart Study and System Programmers For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2024-04-05 00:06:28] |
Sawtooth - Posts: 4120 |
I need the Study/Price Overlay Study to calculate at source chart bar close only, not intra-bar.
Have you tried using the Displacement setting of the study on the source chart?
|
[2024-04-05 06:50:12] |
jeden8l - Posts: 47 |
Thank you John. I will check this. Have you tried using the Displacement setting of the study on the source chart?
Thanks Sawtooth. The displacement option of the overlayed subgraph changes only the draw, not the underlying data, I had the problem with this. I do have a custom code that fixes this, I will give it a try. |
[2024-04-05 13:37:41] |
Sawtooth - Posts: 4120 |
The displacement option of the overlayed subgraph changes only the draw, not the underlying data
I think my idea would only work on time based charts, and where the source chart was a higher time frame.For example, the source chart is 5 min, and the destination chart is 1 min: - Set the source chart study's displacement to -1 - Add the Spreadsheet Formula study to the destination chart, and use a formula like this in its Formula field: =IF(ID4.SG1>0,ID4.SG1,IF(AND(ID4.SG1[-1]>0,ID4.SG1=0),ID4.SG1[-1],ID5.SG1[-1])) where ID4 is the Study/Price Overlay study on the destination chart, and ID5 is this Spreadsheet Formula study. This makes the displayed displaced line persistent until the close of the current 5 min bar. And it's its previous value on the 5 min chart, until the 5 min bar closes. Then reference the Spreadsheet Formula study instead of the Study/Price Overlay study. |
[2024-04-07 00:37:03] |
jeden8l - Posts: 47 |
Thanks. Actually in this particular case my bars are nowhere near time based bars :) But it's still some hint for the future. |
To post a message in this thread, you need to log in with your Sierra Chart account: