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.
    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    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


              #7
              hi,
              how to use above above code to place order by ATM strategy selected as video is not available

              Comment


                #8
                Hello shankar.deshapande,

                You would need to import the zip file into NinjaTrader using Tools -> Import NinjaScript.
                After that it will appear at the bottom of the New menu.
                You will need to be connected to a data provider to have the account populate in the addon.
                After selecting the account and template press submit order.

                I look forward to being of further assistance.

                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by GwFutures1988, Today, 02:48 PM
                1 response
                3 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by ScottWalsh, 04-16-2024, 04:29 PM
                6 responses
                27 views
                0 likes
                Last Post ScottWalsh  
                Started by frankthearm, Today, 09:08 AM
                10 responses
                35 views
                0 likes
                Last Post frankthearm  
                Started by mmenigma, Today, 02:22 PM
                1 response
                3 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by NRITV, Today, 01:15 PM
                2 responses
                9 views
                0 likes
                Last Post NRITV
                by NRITV
                 
                Working...
                X