Announcement

Collapse
No announcement yet.

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.
    https://ninjatrader.com/support/foru...555#post515555

    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.
        https://ninjatrader.com/support/help...gyselector.htm

        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 zacharydw00, Today, 05:14 PM
        0 responses
        5 views
        0 likes
        Last Post zacharydw00  
        Started by shahabjet1, Today, 04:47 PM
        0 responses
        12 views
        0 likes
        Last Post shahabjet1  
        Started by aligator, Today, 04:32 PM
        0 responses
        10 views
        0 likes
        Last Post aligator  
        Started by timko, Today, 04:02 PM
        0 responses
        9 views
        0 likes
        Last Post timko
        by timko
         
        Started by asmmbillah, Today, 03:37 PM
        2 responses
        18 views
        0 likes
        Last Post asmmbillah  
        Working...
        X