Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 13:05:49 +0000



[Programming Help] - Customizing trade window from control bar

View Count: 847

[2019-10-22 02:39:11]
T44 - Posts: 363
We also decided we will add new control types to the Control Bar for the Trade Account selection and for the display of the Position and Profit/Loss .
--from November 2018, Customizable Trade Window

Hello Engineering...

We've been patiently waiting for this very useful feature to be implemented. Currently there is no way to show position quantity on the DOM if your average price is "off the page" and you haven't enabled a (large) trade window.

DOM is nearly perfect, thank you!
[2019-10-23 16:39:20]
Sierra Chart Engineering - Posts: 104368
We will try to get to this soon.
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-10 08:35:54]
T44 - Posts: 363
This code almost works but I'm having floating point imprecision issues.
I can solve this using the precision feature of the format specifier but I'm not sure how to get and pass the correct value on a per instrument basis.
e.g. %.1f for gold, %.0f for Dow, %.5f for EUR/USD. (without an ugly workaround of detecting the symbol e.g. sc.Symbol.CompareNoCase and case/switch)

s_SCPositionData PositionData;
int Quantity = 0;
Quantity = PositionData.PositionQuantity;
float AveragePrice = 0;
AveragePrice = sc.RoundToTickSize(PositionData.AveragePrice, sc.TickSize);
PositionQuantity.Format("%d @ %.1f", Quantity, AveragePrice);
sc.SetCustomStudyControlBarButtonText(ACS_BUTTON_9, PositionQuantity);

Date Time Of Last Edit: 2019-11-10 08:36:04

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

Login

Login Page - Create Account