Login Page - Create Account

Support Board


Date/Time: Thu, 18 Apr 2024 17:45:26 +0000



Statistical Performance Over Time - Trade Statistics & s_ACSTradeStatistics

View Count: 1450

[2019-06-07 16:20:45]
User796776 - Posts: 95
I am able to use sc.GetTradeStatisticsForSymbol to get both a period, and a daily statistical summary.

These are useful snapshots, but I am not able to leverage the statistics to measure and track performance over time.

In order to track performance over time, I need to capture the s_ACSTradeStatistics structure after each Flat to Flat trade is processed and write it out in a table format.

I am willing to do this in ACSIL by processing the order fill entries and reproducing the statistics in s_ACSTradeStatistics if necessary.

Before developing this, I wanted to ask:

1. Is there a way to iterate through the trades and obtain the s_ACSTradeStatistics structure after each Flat to Flat trade is processed?

2. If not, does sc.GetTradeStatisticsForSymbol contain the statistics algorithms necessary to populate s_ACSTradeStatistics and could this be released as an example in the \ACS_Source folder to allow enhancements like statistical performance over time to be added?
[2019-06-08 23:18:24]
Sierra Chart Engineering - Posts: 104368
This may not really answer your question, however:

What we are going to do is add new flat to flat trade statistics to s_ACSTradeStatistics and any other new fields you see on the Trade Statistics tab of the Trade Activity Log and we will also add a new function to obtain flat to flat trades.

With all the work that has been done regarding Trade Statistics and Trade Activity, all of this is now easily possible.

but I am not able to leverage the statistics to measure and track performance over time.
You can because the trades statistics do cover a period of time for as much order fills that are loaded into the chart.



1. Is there a way to iterate through the trades and obtain the s_ACSTradeStatistics structure after each Flat to Flat trade is processed?
We can add this capability.
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: 2019-06-08 23:25:59
[2019-06-10 19:32:32]
User796776 - Posts: 95
Excellent news on the flat to flat changes to s_ACSTradeStatistics and Flat to Flat iteration capability.

As a follow-up, is there a function, similar to sc.GetOrderForSymbolAndAccountByIndex, to allow iteration of all Trade Activity entries?

Using sc.GetOrderFillEntry to get filled orders, I have tried to use the FillData.InternalOrderID to call sc.GetOrderByOrderID to get the original order information so I could reconstruct the original order with child orders but this doesn't work as SCTRADING_ORDER_ERROR is returned for (non-active) historical orders.

The order details are present in the Trade Activity log, but need a method to retrieve them.
[2019-06-10 21:38:50]
Sierra Chart Engineering - Posts: 104368

As a follow-up, is there a function, similar to sc.GetOrderForSymbolAndAccountByIndex, to allow iteration of all Trade Activity entries?
No, we thought about this but the implementation is complicated.
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-06-10 21:38:50]
Sierra Chart Engineering - Posts: 104368

As a follow-up, is there a function, similar to sc.GetOrderForSymbolAndAccountByIndex, to allow iteration of all Trade Activity entries?
No, we thought about this but the implementation is complicated.
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-06-10 23:08:20]
User796776 - Posts: 95
Ok, to make sure I am not missing anything; I see my options as:

1. Capture/store s_SCTradeOrder at order instantiation, or
2. Use the trade activity window to manually copy the activity to the clipboard and paste it into another app to process

Is there a different approach I should consider?
Date Time Of Last Edit: 2019-06-10 23:08:56
[2019-06-17 20:36:34]
User796776 - Posts: 95
Checking for an update on post #2...

the ability iterate through the trades and obtain the s_ACSTradeStatistics structure after each Flat to Flat trade is processed

Any insight on when this functionality will be added?
Date Time Of Last Edit: 2019-06-17 23:53:30
[2019-06-20 04:47:20]
Sierra Chart Engineering - Posts: 104368
These new ACSIL functions are available in the latest prerelease:
  int (SCDLLCALL* GetFlatToFlatTradeListSize)();
  int (SCDLLCALL* GetFlatToFlatTradeListEntry)(unsigned int TradeIndex, s_ACSTrade& TradeEntry);
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: 2019-06-20 04:47:31
[2019-06-20 20:32:25]
User796776 - Posts: 95
Tested with v1938 and GetFlatToFlatTradeListSize() only seems to return 0.
[2019-06-20 21:33:34]
Sierra Chart Engineering - Posts: 104368
We had to activate the maintenance of the Flat to Flat list for charts. That was not done. This will be out in about a day.
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: 2019-06-20 21:33:47
[2019-06-24 21:37:53]
User796776 - Posts: 95
Tested with v1939 and GetFlatToFlatTradeListEntry returns the s_ACSTrade for the Flat2Flat position.

At this point I have the Flat2Flat summary (s_ACSTrade) but I also need the detail stats found in s_ACSTradeStatistics calculated from all the trades comprising the Flat2Flat trade.

Something like

int (SCDLLCALL* GetFlatToFlatTradeListEntry)(unsigned int TradeIndex, s_ACSTrade& TradeEntry, s_ACSTradeStatistics& TradeStats);

Would this be possible?
[2019-06-26 19:04:25]
Sierra Chart Engineering - Posts: 104368
Additional flat to flat related statistics will be added to s_ACSTradeStatistics. Not sure how soon we can get to it though.
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
[2020-01-24 08:18:07]
Sierra_Chart Engineering - Posts: 13988
In regards to post #12, there is this new function:
sc.GetTradeStatisticsForSymbolV2
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, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account