• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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, 08: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 manueldecastro, Today, 12:57 AM
            0 responses
            5 views
            0 likes
            Last Post manueldecastro  
            Started by JulieG, Today, 12:40 AM
            0 responses
            3 views
            0 likes
            Last Post JulieG
            by JulieG
             
            Started by jimjoe123, Yesterday, 09:28 PM
            2 responses
            9 views
            0 likes
            Last Post NinjaTrader_ChrisSch  
            Started by 12VMan, 08-20-2019, 09:29 AM
            2 responses
            21 views
            0 likes
            Last Post Lancer
            by Lancer
             
            Started by tgn55, Yesterday, 09:50 PM
            0 responses
            5 views
            0 likes
            Last Post tgn55
            by tgn55
             
            Working...
            X