Support Board
Date/Time: Wed, 15 Jan 2025 16:19:25 +0000
Custom Study Alert formula
View Count: 1408
[2017-07-10 13:08:07] |
User92311 - Posts: 11 |
Hello, We are a propfirm, and one of our senior traders is building a new trading system based on the SC repulse indicator through the study alerts field. He was able to come up with a formula which is made of 2 separate parts/conditions. When he writes the 2 conditions as two separate strings, the alerts work, when he puts them both together in the same string (as it should be) he gets a syntax error. Here is the formula: =AND(OR(CROSSFROMABOVE(ID4.SG3[-1],ID1.SG1[-1]),CROSSFROMABOVE(ID4.SG3[-2],ID1.SG1[-2])),(ID4.SG4>ID1.SG1,ID3.SG1[0]>ID3.SG1[-1],ID3.SG1[-1]<ID3.SG1[-2])) We would appreciate if somebody could tell us what he's doing incorrectly and how to combine the 2 conditions together. Thank you, Savius |
[2017-07-10 14:34:49] |
Sierra Chart Engineering - Posts: 104368 |
Use this: =AND( OR( CROSSFROMABOVE(ID4.SG3[-1], ID1.SG1[-1]), CROSSFROMABOVE(ID4.SG3[-2],ID1.SG1[-2]) ), ID4.SG4>ID1.SG1, ID3.SG1[0]>ID3.SG1[-1], ID3.SG1[-1]<ID3.SG1[-2] ) Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2017-07-12 17:45:53] |
User92311 - Posts: 11 |
This seems to work, we will test and see. May we ask the logic of the extra space after/before the parentheses, we were not familiar with that nuance. Thank you again. |
[2017-07-12 19:06:01] |
Sierra Chart Engineering - Posts: 104368 |
This just makes it more easy to read.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to 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: