Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 17:55:47 +0000



[Programming Help] - MACD Study/Price overlay inaccurate for signal conditions on lower time frame chart

View Count: 1264

[2021-07-29 19:49:55]
BenjaminR - Posts: 168
I'm using a study/price overlay on a Tick chart, that pulls in MACD data from a Volume Bar chart for a spreadsheet study. The Tick chart is faster than the Volume Bar chart.

When I use the crosshairs and compare the moment conditions are true- it's not always accurate- & I don't mean off by a little bit of time- even several minutes/bars.

For example, one of the conditions for the tick chart is that the MACD is positive on the volume chart; however, the MACD on the volume chart is clearly negative sometimes. Again, not by 1 bar, or even a minute.

Fill Blanks With Last Value is set to "Yes".

I have tested the input Data Copy Mode with both "Earliest" & "Latest" settings.
I have also tested input Bar Time Matching Method with "Nearest" & "Containing"

The problem still remains.

Please advise.

Thank you!
Date Time Of Last Edit: 2021-07-29 19:50:52
[2021-07-29 20:11:56]
John - SC Support - Posts: 31355
We are not sure we are fully understanding what you are asking about, as there seems to be a missing piece. In particular, is there an Alert on one of the charts and what are the conditions of the alert?

And how are you verifying that the information is not accurate at the time the alert goes off? You would need to look at all the information at that bar and the data as it was at that bar.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-07-29 21:16:38]
BenjaminR - Posts: 168
The charts: a 1500 tick chart & a 4000 volume bar chart w/ a MACD.

On the Tick Chart, I have a Color Bar w/Alert Condition with two conditions- one condition is a volume requirement from a volume study on the same chart, & the other condition is for the MACD on the Volume Chart, for which data is obtained by referencing the Study/Price Overlay Study.

There are TWO separate Color Bar w/ Alert Condition Studies on the Tick Chart that are exactly the same- just inverse of each other: one is for Buy Signals, the other is for Sell signals, & each signal has a condition for whether the MACD is positive or negative (respectively).

I have linked the charts, & find the exact bar on the Tick Chart where the signal has been true, & look at the corresponding time on the Volume Bar chart- & the condition isn't met. In other words, where the MACD condition is supposed to be >0 for SG3 (MACD Differential).. the MACD at that time on the Volume chart is negative.

I wouldn't be bothered if it was +/- one bar where there is the crossover; however, it's off by a longshot. In other words- the signal really should be invalid, as the condition was not met.

I hope that helps clear things up.

Thanks!
Date Time Of Last Edit: 2021-07-29 21:55:50
[2021-08-02 13:43:11]
John - SC Support - Posts: 31355
You will need to figure out what is going on with your setup, as helping with these kind of Alerts is considered Programming Help (and this thread has been tagged as such). But, just to help you get started, since you are looking at the Study/Price Overlay for the value of the MACD on the Tick Chart, you need to check the value of that study at the time the Alert goes off. The main question being whether the value at that time is correct or incorrect and why. If the Study/Price Overlay is not showing the proper values then you need to consider the various options on the Study/Price Overlay to see if there is a better way to set the bar matching.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-08-03 00:17:33]
Sawtooth - Posts: 3992
There are two settings in the Study/Price Overlay study that can affect what you are seeing:
Data Copy Mode
Bar Time Matching Method

Since you have non-time based bars, it is recommended that you use Earliest... for the Data Copy Mode.
Auto Trade System Back Testing: Performing Back Testing on a Trading System That Uses Multiple Charts

Experiment with the Bar Time Matching Method choices to find the best.

In my experience, there is no combination of settings that always remove all of these anomalies of the Study/Price Overlay study.
You will sometimes have a signal that arrives late, or a signal that occurs where it should then disappears.
It is therefore problematic to use multiple charts for alerts or autotrading, more so when using non-time-based charts.
[2021-08-05 12:05:09]
BenjaminR - Posts: 168
tomgilb: Thank you for confirming that this is a perennial problem- doesn't seem like the Volume Bar/Tick chart combination with Study/Price Overlay is particularly suited for time based signals either, which is unfortunate.

In your experience or opinion, would the accuracy problem be eliminated if the signal was coded in ACSIL instead of done as an alert or in a spreadsheet study?

I have only started to delve into learning how to use ACSIL, as ultimately an ACSIL based study is the end goal & form for this signal & others.

Thank you for your help!
Date Time Of Last Edit: 2021-08-05 12:06:01
[2021-08-05 23:50:02]
Sawtooth - Posts: 3992
In your experience or opinion, would the accuracy problem be eliminated if the signal was coded in ACSIL instead of done as an alert or in a spreadsheet study?
IMO, it's not possible to completely eliminate this anomaly, regardless of the method.

When comparing 2 different chart's bars, each of different dynamic durations, each bar will begin and end at random times.
So while one bar is building, the other has completed, or vice versa, or they are both building.
Signals on one could reverse intrabar, while signals on the other wouldn't, or vice versa.
Signals on one at close of bar would likely never be concurrent with the signal on the other.
The begin/end timing offsets of each chart's bars would continually be random so comparison could never be always accurate.
[2021-08-05 23:58:38]
BenjaminR - Posts: 168
"...[because of] different dynamic durations, each bar will begin and end at random times.
So while one bar is building, the other has completed, or vice versa, or they are both building". ~ This makes a lot of sense, helps me understand & lessens the aggravation... I hadn't considered that. Thank you!
[2022-02-12 23:48:25]
User35525 - Posts: 180
Yes, differing times on two charts means a "simple" overlay is impossible... unless a new Data Copy Mode were to be created called "Mirror Destination Chart Timestamps".

What's needed, to create a proper overlay, is to track studies on the source chart according to the bar timestamps on the destination chart. This is a multi-dimensional data series. I imagine that's not trivial, but I'd bet the Sierra Chart engineers could do it.
Date Time Of Last Edit: 2022-02-14 04:00:47
[2022-02-14 04:00:53]
User35525 - Posts: 180
Currently all my overlay studies "repaint" and it's hard to make money with that happening. A good overlay subsystem is an essential feature in my opinion. If charting software companies aren't providing that feature then SC could be the first.

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

Login

Login Page - Create Account