Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 10:25:49 +0000



How to access open profit/loss within another study?

View Count: 684

[2019-11-09 21:43:51]
j4ytr4der_ - Posts: 918
I'm interested in creating a stop level based on a percentage of open equity.

I found the Trading: Profit/Loss Text Study which is great, but doesn't appear to be accessible from any other study.

Is there a way to fetch this number from within another study so that I can use it in a formula or calculation?
[2019-11-12 05:02:18]
Sierra Chart Engineering - Posts: 104368
There is a field of data accessible by ACSIL and also within the Spreadsheet System for Trading study which does have the profit/loss for all symbols being traded.
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
[2019-11-12 15:29:02]
j4ytr4der_ - Posts: 918
Oh ok but no way to access it from an alert study? I'm not into ACSIL or Spreadsheets yet.
[2019-11-16 02:29:19]
j4ytr4der_ - Posts: 918
Anyone else have any idea if it's possible to retrieve the open profit/loss from another study? I just want to be able to trigger a trailing stop once there is a certain amount of open profit.

So far all my attempts to get this data have failed. Still hoping there's some way to get it just from a simple study.
[2019-11-16 02:39:50]
Sawtooth - Posts: 3992
Try this:
- Add the Spreadsheet System for Trading study. This is the only study that has this datum.
- Put this formula in cell O3:
=$J$10
This makes the value accessible to other studies via the spreadsheet's ID#.SG#

Caution: This is an autotrading spreadsheet study:
- Do not put any formulas in columns K-N.
- Put a 1 in cell J28.
[2019-11-16 03:26:14]
j4ytr4der_ - Posts: 918
Very interesting, thanks Tom! At the moment I've managed a workaround, using Frederik's AVG Fill Price study and then doing the math to determine the distance from the current price to the fill price. Only really works easily on single lot trading though so I'll look at the Spreadsheet System approach as well. Thanks again!

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

Login

Login Page - Create Account