Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Saving AtmStrategy Templates

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

    Saving AtmStrategy Templates

    Hi,

    I noticed that when using an atm template as source to edit and save it with a new name, the xml file contains the name of the original atm instead of the new

    Example : I select an atm named ATMname on Chart Trader, click on edit
    change a few things, and click on save as template
    Save it as ATMname2

    But if I open the xml file (ATMname2.xml) the field "Name" still contains the original name "ATMname"

    This is avoiding that when we look at the selected atm name ;
    Print(atmselector.SelectedAtmStrategy.Name) to get the correct atm selected by the user.
    Attached Files
    pmaglio
    NinjaTrader Ecosystem Vendor - The Indicator Store

    #2
    Hello pmaglio,

    I am testing this behavior using the public latest version 8.0.2.0, but I am not able to reproduce this behavior.

    Below is a link to a video of my test.
    http://www.screencast.com/t/facBv5PuWjv

    Attached is the Addon script I have used to test this.

    Please ensure you are using 8.0.2.0 and use the Addon I have provided and follow the steps in the video.
    Let me know if when taking the same steps you get different behavior.
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Your example works fine thanks.
      MY trouble was much simpler ; I just wanted to retrieve the name of the selected ATM from a Strategy or indicator...
      ...but I discovered I was using the wrong extension ;

      Example ; if atmselector is the automation id of the ATM selection on Chart Trader

      And this is the part of the code ( of an indicator or Strategy working on the chart whose chart trader ATM I want to read ) ;

      if (atmselector != null && atmselector.SelectedAtmStrategy != null)
      {
      // I was reading this, which not always print the correct ATM name
      Print(atmselector.SelectedAtmStrategy.Name);

      //But now I replaced the code by this and seems to be working fine
      Print(atmselector.SelectedAtmStrategy.DisplayName) ;
      }
      pmaglio
      NinjaTrader Ecosystem Vendor - The Indicator Store

      Comment


        #4
        Hi Community,

        I made some modifications to this script to allow the account to be selected and to have the AtmStrategySelectionMode set to .SelectActiveAtmStrategyOnOrderSubmission so that the active atm is selected when an order is placed.
        Attached Files
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Nice Addon Example
          Were the Windows , Buttons and drop down selects created from scratch
          or with Visual Studio, If so which version do you use ?
          Last edited by JerryWar; 08-03-2017, 07:28 AM.

          Comment


            #6
            Hello JerryWar,

            This script is created with the NinjaScript Editor.

            Most objects are NinjaTrader Development created objects.

            NinjaTrader.Gui.Tools.NTMenuItem
            NinjaTrader.Gui.Tools.AccountSelector
            NinjaTrader.Gui.NinjaScript.AtmStrategy.AtmStrateg ySelector
            NinjaTrader.Gui.Tools.InstrumentSelector

            The Button, Page, and Grid are System.Windows.Controls.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by rmicalet, Today, 07:10 PM
            0 responses
            2 views
            0 likes
            Last Post rmicalet  
            Started by cincai, Today, 07:02 PM
            0 responses
            1 view
            0 likes
            Last Post cincai
            by cincai
             
            Started by AlexsOptions, Today, 05:42 PM
            2 responses
            12 views
            0 likes
            Last Post AlexsOptions  
            Started by philli4093, Today, 05:20 PM
            2 responses
            8 views
            0 likes
            Last Post philli4093  
            Started by memonolog, Today, 04:58 PM
            0 responses
            4 views
            0 likes
            Last Post memonolog  
            Working...
            X