Support Board
Date/Time: Fri, 10 Jan 2025 10:07:04 +0000
[Programming Help] - Buy/Sell formula using Study Angle
View Count: 1251
[2016-08-20 21:24:42] |
Litz - Posts: 131 |
Experimenting with auto trading based on a change in the Study Angle. Buy on negative to positive and sell positive to negative. Need some help on the formula to express the changes. I realize Sierra does not provide help in coding.
Date Time Of Last Edit: 2016-08-20 21:40:25
|
[2016-08-20 23:58:08] |
Sawtooth - Posts: 4147 |
Try this: For Simple Alerts: Buy signal: =AND(ID1.SG1[-2]>ID1.SG1[-1],ID1.SG1>ID1.SG1[-1]) Sell signal: =AND(ID1.SG1[-2]<ID1.SG1[-1],ID1.SG1<ID1.SG1[-1]) where ID1 is the Study Angle study, edit as needed. For spreadsheet studies: Buy signal: =AND(ID1.SG1@5>ID1.SG1@4,ID1.SG1@3>ID1.SG1@4) Sell signal: =AND(ID1.SG1@5<ID1.SG1@4,ID1.SG1@3<ID1.SG1@4) where ID1 is the Study Angle study, edit as needed. |
[2016-08-21 00:18:46] |
Litz - Posts: 131 |
Thanks again Tom. You are a great help. Would have taken me forever.
|
[2016-08-21 16:24:02] |
Litz - Posts: 131 |
The Spreadsheet worked fine but got a #SYNTAX! ERROR on the Simple Alert formulas
|
[2016-08-21 17:42:35] |
Sawtooth - Posts: 4147 |
The Simple Alert syntax only works for Simple Alerts and the spreadsheet syntax only works in spreadsheets studies. The former is used on the Alerts tab of a study, the latter in (usually) row 3 of a Formula Column in a spreadsheet study's spreadsheet sheet. Both work for me in their respective uses. What are you trying to do with the Simple Alert syntax? |
[2016-08-21 17:48:20] |
Litz - Posts: 131 |
My mistake was using the Simple Alert in a Spreadsheet/System Alert Study
|
To post a message in this thread, you need to log in with your Sierra Chart account: