Login Page - Create Account

Support Board


Date/Time: Sun, 08 Sep 2024 02:11:20 +0000



DOM Totals Questions

View Count: 258

[2023-12-29 08:19:19]
User282251 - Posts: 2
Hello,

I have a question, on the current traded columns in the DOM it is possible to display the total sum on the bottom. Is it possible to display the same for study? I cannot seem to find this setting in the studies settings section (If not could this feature be added?)


Second, is there any way to see the total sum of all the bid column and the sum of the ask column without having to scroll all the way to the top and bottom of the DOM?
Date Time Of Last Edit: 2023-12-29 08:20:12
[2023-12-29 15:14:45]
John - SC Support - Posts: 34254
There is not a sum of the Current Traded Bid/Ask available. This would be something we would have to add. We have noted the request, but we can not say when we would get to it.

The "Bid And Ask Depth Bars" study allows you to display the Sum of the Bid or the Sum of the Ask. So you would need 2 copies of the study to get both. You can then use other studies to display the information more prominently (if you want) - in particular the "Text Display for Study".

Refer to the following:
Bid & Ask Depth Bars

Text Display For Study
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-01-02 07:51:21]
User282251 - Posts: 2
When I wrote the original question I think I did not write it clearly

In the dom columns:

Current traded total volume
Current traded bid volume
Current traded ask volume

There is the option to have the totals of each column displayed (It goes in the row below the last value in the column)

I would like to have the same option in a study (Im assuming its probably already somewhere but I cannot seem to find it)
[2024-01-02 14:16:23]
Sierra_Chart Engineering - Posts: 16292
There is no same option like this for a study. You will need to create your own custom study to accomplish what you need:
Advanced Custom Study Interface and Language (ACSIL)
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-07-19 11:50:35]
User357489 - Posts: 67
Hi there

I want to create a study for the Trade Dom, whereby prices in the price column are highlighted where pulling/stacking column volume is >=100 on both Bid pull/stack and Ask pull/stack.
#include "sierrachart.h"

SCDLLName("Custom DOM Study");

// Define the study function
SCSFExport scsf_CustomDOMStudy(SCStudyInterfaceRef sc)
{
// Initialization
if (sc.SetDefaults)
{
sc.GraphName = "Custom DOM Highlighting Study";
sc.StudyDescription = "Highlights prices in the DOM based on bid/ask volume conditions in pulling/stacking columns.";
sc.AutoLoop = 1; // Auto-loop enabled

// Define subgraphs for bid and ask highlights
sc.Subgraph[0].Name = "Bid Highlighted Prices";
sc.Subgraph[0].PrimaryColor = RGB(0, 255, 0); // Green for bid
sc.Subgraph[0].DrawStyle = DRAWSTYLE_TEXT; // Use DRAWSTYLE_TEXT to color text
sc.Subgraph[0].LineWidth = 2;

sc.Subgraph[1].Name = "Ask Highlighted Prices";
sc.Subgraph[1].PrimaryColor = RGB(255, 0, 0); // Red for ask
sc.Subgraph[1].DrawStyle = DRAWSTYLE_TEXT; // Use DRAWSTYLE_TEXT to color text
sc.Subgraph[1].LineWidth = 2;

// Input for volume threshold
sc.Input[0].Name = "Volume Threshold";
sc.Input[0].SetInt(100); // Default threshold value

// Input for number of levels to consider
sc.Input[1].Name = "Number of Levels";
sc.Input[1].SetInt(5); // Default number of levels

return;
}

// Main calculation
int threshold = sc.Input[0].GetInt();
int numLevels = sc.Input[1].GetInt();

// Ensure we have market depth data
if (sc.UpdateStartIndex == 0)
{
// Initialize the subgraph to default values
for (int i = 0; i < sc.ArraySize; ++i)
{
sc.Subgraph[0][i] = 0.0;
sc.Subgraph[1][i] = 0.0;
}
}

s_MarketDepthEntry depthEntry;

// Loop through market depth data for ask and bid sides
for (int level = 0; level < numLevels; ++level)
{
// Ask side
if (sc.GetAskMarketDepthEntryAtLevel(depthEntry, level))
{
int askVolume = depthEntry.Quantity;
float askPrice = depthEntry.Price;

// Check if ask volume is greater than or equal to threshold
if (askVolume >= threshold)
{
// Highlight ask price in the subgraph
for (int i = sc.UpdateStartIndex; i < sc.ArraySize; ++i)
{
if (sc.BaseData[SC_LAST][i] == askPrice)
{
sc.Subgraph[1][i] = askPrice; // Highlight ask price
}
}
}
}

// Bid side
if (sc.GetBidMarketDepthEntryAtLevel(depthEntry, level))
{
int bidVolume = depthEntry.Quantity;
float bidPrice = depthEntry.Price;

// Check if bid volume is greater than or equal to threshold
if (bidVolume >= threshold)
{
// Highlight bid price in the subgraph
for (int i = sc.UpdateStartIndex; i < sc.ArraySize; ++i)
{
if (sc.BaseData[SC_LAST][i] == bidPrice)
{
sc.Subgraph[0][i] = bidPrice; // Highlight bid price
}
}
}
}
}
}

Please see above my current attempt, with some screenshots of the current state of affairs.

I wondered if someone could help me as I'm at a loss as to how I make it function lol

Thank you in advance to anyone
imageimage.png / V - Attached On 2024-07-19 11:48:13 UTC - Size: 33.54 KB - 25 views
imageimage.png / V - Attached On 2024-07-19 11:48:26 UTC - Size: 48.9 KB - 21 views
Attachment Deleted.

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

Login

Login Page - Create Account