Login Page - Create Account

Support Board


Date/Time: Mon, 21 Apr 2025 16:27:10 +0000



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

[2025-03-06 01:44:20]
LTSys2 - Posts: 11
Fresh install and same problem.

As a test I created a study that just tries to open an order.

Put the study on the EURUSD chart and it fails.

Here's the code...


  s_SCNewOrder order;
  
  order.OrderType = SCT_ORDERTYPE_MARKET;
  order.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED;
  order.OrderQuantity = 1000;
  
  order.TextTag = "123456";

  if(static_cast<int>(sc.BuyOrder(order)) > 0) {
    
    sc.AddMessageToLog("success", 0);
    
  } else {
    
    sc.AddMessageToLog("failed", 0);
  }

Date Time Of Last Edit: 2025-03-06 01:47:08