Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 02:43:07 +0000



Trigger Trade Mgmt By Study

View Count: 228

[2024-07-01 15:38:16]
jrob - Posts: 22
Hello,

I would like to manage my stops using a Study, however, I don't want that to be triggered unless price is X points away from entry. Very similar to the Trigger Trail Stop, but instead of using a static value, its uses a study. Is that possible using spreadsheets or the Trade Mgmt Study?
[2024-07-01 16:28:02]
John - SC Support - Posts: 36238
There is not a built-in way to have this occur automatically. You can manually Enable/Disable the "Trade Management by Study", which is the closest option available. Refer to the information for the "ACS Control Bar Button # for Enable/Disable":
Attached Orders: Trade Management by Study Input Settings

The other option would be to modify the source code for the "Trade Management by Study", which is in the file named 'AutomatedTradeManagementBySubgraph.cpp' 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
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-07-01 19:15:49]
Sawtooth - Posts: 4118
Is that possible using spreadsheets or the Trade Mgmt Study?
You could use the Spreadsheet System for Trading study, with a formula in a Formula Column referencing $J$48 with your x points offset.
(Don't use columns K-N.)
Then reference that Formula Column's subgraph in the Trade Management by Study study.
Date Time Of Last Edit: 2024-07-01 19:17:43
[2024-07-01 21:51:57]
jrob - Posts: 22
Thanks for the reply. I am not sure I totally follow.

After price is 12 points from entry, I would like to start trailing using a 9SMA. I can configure Column O with an offset of 12 points from J48, but not sure how to configure the Trade Mgmt Study. Pointing it to Column O will just trail the 12 points with the configured offset in the study and pointing it to the Moving Average study, will ignore the 12 points trigger. Maybe I am not understanding correctly.
[2024-07-01 23:14:17]
Sawtooth - Posts: 4118
In the TMS study, set the 'Trailing Offset' to 0 ticks.
Use Column O for Longs and Column P for Shorts, and use 2 instances of the TMS study.

The idea is the trailing stop price is always determined by the formulas on the spreadsheet.

What is the offset from the 9 SMA so I can give a sample formula?
[2024-07-02 00:17:44]
jrob - Posts: 22
2 points from the 9 SMA, and thank you very much.
[2024-07-02 01:03:09]
Sawtooth - Posts: 4118
Longs:
O3:
=IF(AND($J$8>0,E3<$J$48+12),$J$48-12,IF(AND($J$8>0,E3>=$J$48+12,E3>ID1.SG1@3),ID1.SG1@3-2,0))

Shorts:
P3:
=IF(AND($J$8<0,E3>$J$48-12),$J$48+12,IF(AND($J$8<0,E3<=$J$48-12,E3<ID1.SG1@3),ID1.SG1@3+2,0))

I've made some assumptions here:
- Your 9 SMA is ID1.SG1
- Your initial stop offset is also 12 points.
- You are using Attached Orders.
- If you have multiple targets, you have a common stop.
- Price is beyond the 9 SMA when it has also reached 12 points of profit.
- In the TMS study, 'Only Modify Stops In One Direction' is set to Yes.

I have not tested this.
Date Time Of Last Edit: 2024-07-02 02:00:50
[2024-07-02 01:34:32]
jrob - Posts: 22
Wow, thank you very much. I will test this tomorrow. This requires two TM studies, one pointed at each formula column?
[2024-07-02 01:58:29]
Sawtooth - Posts: 4118
This requires two TM studies, one pointed at each formula column?
Yes.

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

Login

Login Page - Create Account