Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Collection of the AtmStrategy Templates

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

    Collection of the AtmStrategy Templates

    Is there a programmatic NinjaScript way to get a collection of the templates in the AtmStrategy folder?
    C:\Users\<user>\Documents\NinjaTrader 8\templates\AtmStrategy
    I would rather not have to use System.IO and parse the XML.

    These collections of instances variously filtered are not the templates.
    Code:
    NinjaTrader.NinjaScript.AtmStrategy.All 
    //or
    Account.Strategies
    Thanks

    #2
    Hello xcondor,

    There isn't a NinjaScript method that gets the list of Atm Strategies.

    For now this would have to be done using regular c#.

    You can make a Atm Strategy selector control and this will automatically get the list of Atm Strategies.

    Below is a link to an example.


    Please let me know if you would like to submit a feature request for the NinjaTrader Development team to add a NinjaScript collection of Atm Strategy names.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      There isn't a NinjaScript method that gets the list of Atm Strategies.
      For now this would have to be done using regular c#.
      Please let me know if you would like to submit a feature request for the NinjaTrader Development team to add a NinjaScript collection of Atm Strategy names.
      Yes please. There are so many use cases for it. Just let the user load them in a GUI like the Indicators and Strategies, configure them, and decide which ones to load in the selector and which ones to keep parked. For equities there can be so many strategies and the lot sizes are different. No need to keep them loaded all the time. Gotta reduce the bloat.

      Please change the template model to support no specified entry quantity. For those strategies, pass the quantity as a parameter (from code or by the GUI from the QUD value) and then apportion that entry amount to each OCO bracket.

      In other words:

      Entry: param value is Q;
      Target 1: 30% * Q
      Target 2: 70% * Q
      =======================
      Entry: param Q
      Target 1: 30% of Q
      Target 2: 25% of Q
      Design-time validation hint would say: "45% of entry order quantity is not included in a bracket. Do you want to go naked for that remaining 45%? Please change your brackets to match 100% of Q."

      Expose a preference for rounding. The apportioning logic requires some rounding up or down to the lot size. Futures are easier because the lot size is just 1. TradeStation has a very robust model. You might want to look at that.

      Originally posted by NinjaTrader_ChelseaB View Post
      You can make a Atm Strategy selector control and this will automatically get the list of Atm Strategies.
      Accessing the items only gets you the template names as the DisplayName of the AtmStrategy class but still no collection of these templates. Getting just a list of names is useless.

      The selector control is pretty dynamic as it adds items at runtime and their index changes all the time. Also many items like separators,"Custom" and the "None" do not correspond to any strategy. Any unknown control can be hooking into that SelectionChanged event before, during or after it with untoward results. Developing business logic from GUI widgets is a bad practice.
      Originally posted by NinjaTrader_ChelseaB View Post
      Yes I found this sample and it is very nice. Why isn't this method documented? It is so useful. This method does not provide a collection of items though.

      Thanks a lot for working on Sun.

      Comment


        #4
        Hello xcondor,

        I have received tracking IDs for your requests.

        Your request for a collection of Atm Strategy names is being tracked with ID #SFT-3141.

        Your request to remove the quantity from being saved with Atm Strategy templates is being tracked with ID #SFT-1336.

        And your request for the targets of an Atm to use percentages of the total quantity is being tracked with ID #SFT-3142.

        Please note it is up to the NinjaTrader Development to decide if and when any request is implemented.

        As a heads up, the AtmStrategySelector control is documented in the help guide.


        We appreciate your feedback. Please let us know of any other suggestions you have for the NinjaTrader Platform.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by BarzTrading, Today, 07:25 AM
        2 responses
        14 views
        1 like
        Last Post BarzTrading  
        Started by devatechnologies, 04-14-2024, 02:58 PM
        3 responses
        19 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by tkaboris, Today, 08:01 AM
        0 responses
        3 views
        0 likes
        Last Post tkaboris  
        Started by EB Worx, 04-04-2023, 02:34 AM
        7 responses
        162 views
        0 likes
        Last Post VFI26
        by VFI26
         
        Started by Mizzouman1, Today, 07:35 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X