Login Page - Create Account

Support Board


Date/Time: Sat, 23 Nov 2024 15:19:44 +0000



[Programming Help] - Automatic Trendline Spreadsheet Error

View Count: 270

[2024-06-10 02:38:27]
User827002 - Posts: 36
I've used the "spreadsheet system for trading" to develop a system that trades based on automatic trendlines. It puts me in completely random trades, and I've noticed that occasionally rather than showing 0s before a trendline has started it shows numbers from a previous trendline. If I just pause the replay and press play again at a different speed, it corrects it and goes from the first screenshot I've attached to looking like the 2nd screenshot I've attached. This happens live too. I have the "Number of new bars before auto-adjustment" set to 1, and "Skip last N Bars" set to 0. Do you know what might be causing the issue and how to fix it?
imageTLBreakError.png / V - Attached On 2024-06-10 02:37:39 UTC - Size: 146.52 KB - 45 views
imageTLBreakError.2.png / V - Attached On 2024-06-10 02:37:44 UTC - Size: 119.68 KB - 44 views
[2024-06-10 14:36:31]
John - SC Support - Posts: 36238
What you are stating about the trendline data makes sense. The data for the previous values of a trend line are not going to be erased as time goes on and there are changes to the trend lines. But when you force a full update (such as when starting/restarting a replay) you are then forcing all of the data to update, which is why the values would all be zero from that point backward.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-06-10 14:56:28]
User827002 - Posts: 36
The reason that doesn't make sense for me is because I have my automated system reference the value of a trendline from up to 3 hours ago, and it puts me in trades based on the value of that trendline which is inaccurate if its referencing anything other than the current trendline. I have many automatic trendlines and I could create a new spreadsheet study with a formula that shows the values as 0 if its not the current trendline, and then reference that study, but I feel like there should definitely be an easier solution or some setting that does that automatically.
[2024-06-10 15:51:40]
John - SC Support - Posts: 36238
This is how Sierra Chart works. By not recalculating over the entire range of data it keeps the overall processing low.

One option that is available is a study called "Chart Recalculation - Periodic" which will force a full recalculation at a set interval. This would force the Automatic Trendlines to remove the old data and only show the current trendline data. Refer to the following:
Chart Recalculation - Periodic

Another option would be to modify the source code for the Automatic Trendlines to always remove values prior to the current trendline. The source code for this study is located in the file named Studies4.cpp which is located in the ACS_Source folder under your Sierra Chart installation folder.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-08-08 19:13:39]
User827002 - Posts: 36
That did seem to solve the problem for most of the random trades, but not all of them. I just looked into one trade that it took, and the calculation for the up trendline is wrong. I've attached a screenshot here that shows DO4 is > than DO3 which shouldn't be possible for an up trendline. The moment I click play on the replay it corrects itself. Do you know what the error could be here?
image180UpTLError.png / V - Attached On 2024-08-08 19:11:07 UTC - Size: 29.86 KB - 35 views
[2024-08-08 20:54:00]
John - SC Support - Posts: 36238
If you did not change the code to remove prior trendline data then you will always have the possibility of having a problem with this.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-08-09 17:33:21]
User827002 - Posts: 36
Can you please help me understand more specifically which code to delete? I've also tried adjusting the original name and color of the trendline as shown in the screenshot to make sure any changes will be applied, but that's not working. I hit "save all", then I delete and download all data, and it still doesn't actually adjust the name or color when I pull up the automatic trendline.
imageAutoTLcode.png / V - Attached On 2024-08-09 17:31:25 UTC - Size: 13.84 KB - 30 views
[2024-08-09 17:47:10]
John - SC Support - Posts: 36238
What you are asking from us is beyond the scope of our support.

We have set this as Programming Help, as other user's may help you with it.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-08-10 00:50:14]
User827002 - Posts: 36
I don't understand, your recommendation was to edit the source code, which I apparently don't actually have access to edit. This is frustrating when I've put a tremendous number of hours into a system that I'm unable to use because a significant portion of the time, the data is not current and is incorrect. This seems like a major problem that should be addressed. Can you consider fixing this in a future update?
[2024-08-12 13:47:15]
John - SC Support - Posts: 36238
That study is simply not setup for the way you want to use it. The source code for that study is available in the "Studies4.cpp" file which is located in the "ACS_Source" folder under your main Sierra Chart installation folder. Refer to the following:
How to Build an Advanced Custom Study from Source Code

Or you can hire a programmer to help you with modifying the study. You will find a list of programmers at the following link:
https://www.sierrachart.com/index.php?page=doc/SierraChartStudyAndSystemProgrammers.php
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account