Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Use a variable for ATM Strategy template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Use a variable for ATM Strategy template

    I would like to be able to use a variable for the ATM Strategy template name but I cannot get it to work correctly. Below is the code I have in my strategy......

    #region Variables
    // Wizard generated variables
    private string aTM_Template = @"StrategyAtm2"; // Default setting for ATM_Template


    #region Properties
    [Description("Enter the name of the ATM Strategy Template you wish to use")]
    [GridCategory("ATM Strategy Template")]
    public string ATM_Template
    {
    get { return aTM_Template; }
    set { aTM_Template = value; }
    }




    {
    atmStrategyId = GetAtmStrategyUniqueId();
    orderId = GetAtmStrategyUniqueId();
    AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Market, 0, 0, TimeInForce.Day, orderId, "ATM_Template", atmStrategyId);


    }

    #2
    mlarocco, can you please clarify what exactly is not working? It would compile for you normally? And if you then enter the already setup ATM strategy template name in your user input, what would happen?

    Comment


      #3
      Thanks for your reply, I did get it figured out. I needed to remove the " " marks from around the ATM template name..... see below....

      AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Market, 0, 0, TimeInForce.Day, orderId, ATM_Template, atmStrategyId);

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      673 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      379 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      111 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      577 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      582 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X