Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 21:00:18 +0000



Referencing Alert Condition Studies From Trading Systems Based on Alert Condition Study

View Count: 347

[2024-05-05 19:06:40]
TraderBiku - Posts: 36
Hello,

I am working on an automated trading system, and have been using the Color Bar Based on Alert Condition to generate signals while back-testing; one feature I use often is a simple True/False condition check of a different Alert Condition study, ie IDx.SG1 > 0 = TRUE, IDx.SG1 < 1 = False; this allows me to "nest" complex code very easily with out having to make it all explicit within a Alert Condition single study, and allows different studies to refer to each other.

However, when I try to use this same True/False logic to reference other Color Bar Based on Alert Condition Studies within the Trading System Based on Alert Condition study, I find that the signals do not generate correctly, or at all. I am wondering if this is by design, or whether a known feature of how the Trading System/Alert Condition study is designed? It would be extremely useful to be able to refer to other studies as True/False in the same way it is possible to do with in Color Bar/Alert Condition, as otherwise the amount of coding becomes extremely complex in my case.

If there is a way of doing this that I have missed, please let me know - otherwise consider this a feature request.

Thank you -
[2024-05-06 13:54:59]
John - SC Support - Posts: 36238
You have to be careful when using other studies to generate conditions, as the order in which the studies are calculated comes into play. In general, the order of calculations goes from the top of the list of studies to the bottom, but this is not exact. Refer to the following:
Chart Studies: Study Calculation Precedence And Related Issues
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-05-06 14:49:18]
TraderBiku - Posts: 36
Hi John,

Thanks for your response - I am indeed aware of how the study stacking order affects studies referencing each other, and I am able to make this work as desired for the Color Bar study, i.e. successfully reference other studies as True/False. But for whatever reason this does not seem to be mirrored in the way Trading Systems study is responding to these same studies, even when the code is identical to the Color Bar study equivalent and the study sequence is identical as well.

So far, the only work-around I have been able to find is that I have the study I want to reference on a separate chart and then add it as an Overlay/Study to my main chart - this the Trading Systems study IS able to reference as True/False.

Please let me know if I am missing anything -

Thank you -
[2024-05-06 15:41:03]
John - SC Support - Posts: 36238
The only thing you are missing, although finding the information is not straightforward, is that the "Trading System Based on Alert Condition" is set to a "Low Precedence" level and the "Color Bar Based on Alert Condition" is set to a "Very Low Precedence" level.

Therefore the Color Bar Based on Alert Condition study will calculate AFTER the Trading System Based on Alert Condition.

What you did with the Study/Price Overlay is a solution. The other one would be to add the condition from the Color Bar Based on Alert Condition directly into the Trading System Based on Alert Condition.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-05-06 15:44:31]
TraderBiku - Posts: 36
Understood, this is very helpful John, thank you - in my case, there are too many nested conditions to put the Color Bar study code directly into the Trading Systems study, so then Study/Price Overlay it shall be!

Thanks again -
[2024-05-06 15:49:54]
John - SC Support - Posts: 36238
Since you will be using the Study/Price Overlay, you will also want to set the following option to "Yes":
General Settings Window: Use Controlled Order Chart Updating (Global Settings >> General Settings >> Charts >> Charts)
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