Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 09:47:23 +0000



Feature Request

View Count: 377

[2024-03-07 15:01:01]
AndyB - Posts: 101
Hi SC, I have a feature request. Would it be possible to make the "combine trades into original summary trade" option under chart settings >> chart data available for the data recording modes? ive tried using an overlay from a non - data recording mode chart, but since microsecond timestamps are made using a "counter", there is no possible way to line these up correctly that ive found, since each charts microsecond "counter" would be different
[2024-03-08 16:05:26]
AndyB - Posts: 101
Or, instead of a way to combine trades into original summary trade for the recording modes, support a way to line up the overlay studies on two charts that have different time stamping mechanisms? ive tried every combination for study/price overlay and a couple of rounds of workikng through some logic to line the combined orders from the non recording mode chart to the recording mode chart and i just can't think of a way to make it work.
[2024-03-15 12:40:40]
Sierra_Chart Engineering - Posts: 17154
See if you can create a custom study to accomplish what you need.

Combine Trades into Original Summary Trade is very complex with its implementation and we will not be doing any further work with that.
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
[2024-06-19 21:07:15]
AndyB - Posts: 101
Hi SC team,

Following up on this thread.

I believe there may be an issue with how the data recording mode handles some of the intraday data. Specifically the special values for the Open member. I coded up a study to output the values for SCID files to the message log. I ran this study on a 1 trade chart for ESM24_FUT_CME and ESM24_FUT_CME-BID_ASK_TRADE_SYNC. The "non" recording mode symbol correctly outputs the special values. However, the data recording mode only ouputs 0 (SINGLE_TRADE_WITH_BID_ASK). Per the Message Log instructions for "Send For Analysis", I am informing you that I will be sending my message log that shows the output of my study during a replay of approximately the same 20 seconds for ESM24_FUT_CME and ESM24_FUT_CME-BID_ASK_TRADE_SYNC.

Here is my code:

#include "sierrachart.h"

SCDLLName("Unbundled Trade Volume Calculator")

// Function to convert tradeType values to readable strings if necessary
const char* GetTradeTypeDescription(float tradeTypeValue)
{
// Using a small epsilon value for float comparison
const float epsilon = 0.0001f;

if (fabs(tradeTypeValue - SINGLE_TRADE_WITH_BID_ASK) < epsilon)
return "Single Trade with Bid/Ask";
else if (fabs(tradeTypeValue - FIRST_SUB_TRADE_OF_UNBUNDLED_TRADE_VALUE) < epsilon)
return "First Sub Trade of Unbundled Trade";
else if (fabs(tradeTypeValue - LAST_SUB_TRADE_OF_UNBUNDLED_TRADE_VALUE) < epsilon)
return "Last Sub Trade of Unbundled Trade";
else
return nullptr; // or you can use SCString().Format("%f", tradeTypeValue) to log the raw value
}

SCSFExport scsf_UnbundledTradeVolumeCalculator(SCStudyInterfaceRef sc)
{
if (sc.SetDefaults)
{
sc.GraphName = "Unbundled Trade Volume Calculator";
sc.StudyDescription = "Calculates the total unbundled bid and ask volumes for the current symbol from the SCID file.";
sc.AutoLoop = 0; // Do not automatically loop through the chart data
sc.MaintainAdditionalChartDataArrays = 1;
return;
}

s_IntradayRecord IntradayRecord;
int SubIndex = 0;
int ReadSuccess = 1;
bool FirstIteration = true;

while (ReadSuccess)
{
IntradayFileLockActionEnum IntradayFileLockAction = FirstIteration ? IFLA_LOCK_READ_HOLD : IFLA_NO_CHANGE;
FirstIteration = false;

ReadSuccess = sc.ReadIntradayFileRecordForBarIndexAndSubIndex(sc.Index, SubIndex, IntradayRecord, IntradayFileLockAction);

if (ReadSuccess)
{
// Extract and convert necessary values
float tradeType = IntradayRecord.Open;
float askPrice = IntradayRecord.High / 100.0f;
float bidPrice = IntradayRecord.Low / 100.0f;
float tradePrice = IntradayRecord.Close / 100.0f;
unsigned int numTrades = IntradayRecord.NumTrades;
unsigned int totalVol = IntradayRecord.TotalVolume;
unsigned int bidVol = IntradayRecord.BidVolume;
unsigned int askVol = IntradayRecord.AskVolume;

// Only log if totalVol > 0
if (totalVol > 0)
{
const char* tradeTypeDesc = GetTradeTypeDescription(tradeType);
SCString dateTimeString = sc.DateTimeToString(IntradayRecord.DateTime, FLAG_DT_COMPLETE_DATETIME_MS);
SCString logMessage;

logMessage.Format("SubIndex: %d, DateTime: %s, Trade Type: %s, Ask Price: %.2f, Bid Price: %.2f, Trade Price: %.2f, NumTrades: %u, Total Volume: %u, Bid Volume: %u, Ask Volume: %u",
SubIndex,
dateTimeString.GetChars(),
tradeTypeDesc ? tradeTypeDesc : SCString().Format("%.6f", tradeType).GetChars(),
askPrice,
bidPrice,
tradePrice,
numTrades,
totalVol,
bidVol,
askVol);

sc.AddMessageToLog(logMessage, 0);
}

++SubIndex;
}
}

// Release the lock
sc.ReadIntradayFileRecordForBarIndexAndSubIndex(-1, -1, IntradayRecord, IFLA_RELEASE_AFTER_READ);
}

Please advise if there is anything that I missed in the documentation regarding data recording modes that is causing my study to output different values for both symbols. Neither ESM24_FUT_CME or ESM24_FUT_CME-BID_ASK_TRADE_SYNC are set to 'Combine Trades Into Original Summary Trade'. I do understand that there is a work around for this, but I figured that it would be better to at least point it out to you just incase you happen to deem it important enough to look into.

Thank you.
[2024-06-20 14:48:52]
Sierra_Chart Engineering - Posts: 17154
The symbols with a recording mode suffix are known as child symbols. In our testing now, the flag which indicates, whether a trade is part of a bundled trade, is not passed through for child symbols. And if it were, it is not going to work reliably. So no changes are intended. We will update the documentation to make it clear that when using record mode suffixes that combining trades into the original summary trade is not supported.
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