Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 17:39:42 +0000



Total Daily Profit / Loss for all symbols

View Count: 2564

[2015-01-08 16:44:45]
Marmany - Posts: 303
In ACSIL would it be possible in the s_SCPositionData Structure to add a PositionData member to return the Total Daily Profit / Loss for all Symbols?
The cumulative values for all trades in activity log is available but I am just looking for the values for the current day.
I would find this very useful.

Thank you
[2015-01-14 12:25:55]
Marmany - Posts: 303
I would like to be able to access the Total Profit / Loss for all closed trades on the current day for 2 reasons:
1)I have a daily stretch profit target. If hit it makes sense to shut down for the day, but my psychology says open another trade which of course leads to a loss or sting of losses at some stage. For this reason I want to hard wire the target into an ACSIL strategy that will prevent further entries for the current day
2)At other end of scale have a facility with broker whereby all trades closed out if daily loss reaches an agreed level. The broker closes out with market orders. With an early warning alert from the ACSIL strategy I could mitigate the damage by use of stop or limit orders.

The value I look for is of course available in Trade Activity Log / Trade Statistics / Daily Date / Total Profit Loss for Closed Trades. I would like to be able to access this value via a PositionData function, to which P&L for current commodity open trades can be added and implementation of 2 points above be automated in a study.

We already have 2 SCPositionData Structure members that provide this type of info:
DailyProfitLoss applies to current chart symbol only
CumulativeProfitLoss applies to the number of days in Trade Activity Log. I keep this set to 30 days for month end reporting.

Please consider adding “CumulativeProfitLoss” for all closed trades for the current day.

[2015-01-21 21:48:25]
Marmany - Posts: 303
For info, found a way of accumulating total P&L for all symbols traded in a day on a chart based on use of sc.StorageBlock. This gives me a satisfactory system

It would however be better to access the data in Trade Activity Log as this is a compilation from trades on all charts.

Please advise if anyone can see a way of doing this.
[2015-10-05 21:55:30]
User44052 - Posts: 34
Hi Marmany.

Have you been able to programmatically disable the auto-trading study for one symbol?

I hope you can share how.
[2015-10-05 22:36:51]
Sierra Chart Engineering - Posts: 104368
This is very simple. You just do not call the trading order action functions in ACSIL when you do not want to trade.
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
Date Time Of Last Edit: 2015-10-05 22:37:09
[2015-10-06 10:44:33]
Marmany - Posts: 303
44052,
Sierra recently added Global Profit/Loss Management capability, which essentially obviates the need for the study I wrote.
However the attached study will also work in Sim and will provide a basis for whatever you want to do on an individual symbol. Feel free to to adapt accordingly.
I use the study in conjunction with other studies and obviously have no idea how it will perform on your platform, so check out thoroughly before going live.
attachmentPandLFeeder.cpp - Attached On 2015-10-06 10:43:22 UTC - Size: 9.39 KB - 661 views
[2015-10-06 19:35:16]
User44052 - Posts: 34
Thanks for the study, Marmany. I appreciate it.

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

Login

Login Page - Create Account