Support Board
Date/Time: Wed, 26 Feb 2025 19:58:19 +0000
[Programming Help] - using
View Count: 555
[2021-05-25 08:15:48] |
User61576 - Posts: 445 |
can I define the above study to enter a position based on the color change of another study? please check the attached or is there any example of ACSIL code to get that info? thanks |
![]() |
[2021-05-25 12:16:02] |
Sawtooth - Posts: 4176 |
can I define the above study to enter a position based on the color change of another study?
Yes.You can use the Trading System Based On Alert Condition study. Trading System Based on Alert Condition You'll need 2 instances, one for longs and one for shorts. This study uses the Simple Alert syntax. You would need to identify the change in direction of the line. See examples #8 and #9: Study/Chart Alerts And Scanning You'll need to include the ID# of the line before the SG# in these examples, e.g. ID1.SG1 You'll also need to separate up and down in the examples. Just use each AND(...) for each of the two instances. Or you can use the Spreadsheet System For Trading study. Spreadsheet Systems, Alerts and Automated Trading This study uses spreadsheet syntax. Here are example formulas for cells K3/M3, converted from Simple Alert example #8: K3: =AND(ID1.SG1@3>ID1.SG1@4,ID1.SG1@4<ID1.SG1@5) M3: =AND(ID1.SG1@3<ID1.SG1@4,ID1.SG1@4>ID1.SG1@5) If there is ever a single flat segment of the line, you'll need to convert Simple Alert example #9. If there are ever multiple sequential flat segments of the line, use this example: Spreadsheet Example Formulas and Usage: Formula that Matches the Slope Coloring of a Study Subgraph Line You would then use formulas like this in K3/M3 to find the transitions: K3: =AND(Z4=-1,Z3=1) M3: =AND(Z4=1,Z3=-1) You can also create a custom study using ACSIL. Date Time Of Last Edit: 2021-05-25 13:40:35
|
To post a message in this thread, you need to log in with your Sierra Chart account: