Login Page - Create Account

Support Board


Date/Time: Mon, 21 Apr 2025 16:38:14 +0000



Post From: How to attached a custom name to an order using s_SCNewOrder::TextTag?

[2025-03-05 22:39:59]
LTSys - Posts: 68
I unchecked "Use Config Name as Text Tag" and typed in a value in the empty text box and manually placed an order and that worked. I see the text tag value in the orders window and as the study code loops through the orders the text tag value I entered is there... but if I place an order programmatically through the study and set the text tag in the new order object it's just comes back as an empty string when looping through the orders.

Like you said this code should work...


s_SCNewOrder order;

order.OrderType = SCT_ORDERTYPE_MARKET;
order.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED;
order.TradeAccount = "Sim1";
order.Symbol = "EURUSD";
order.OrderQuantity = 1000;

order.TextTag = "test 123";

sc.BuyOrder(order);

Date Time Of Last Edit: 2025-03-05 22:44:19