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

ParameterCollection

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

    ParameterCollection

    Hello!!! Have a good day!

    Can someone help me get the string of parameters in Strategies Tab.

    I'd been searching for solution but I am unfortunate to see what I am looking for.

    See attached image:
    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	13.0 KB
ID:	907456

    I've come as far as:
    StrategyData.Strategy.Parameters
    base.Parameters

    However, calling ToString() on this object just returns the string: 'NinjaTrader.Strategy.ParameterCollection'.

    I want to recycle my parameter in strategy tab - can someone help me anyway to access the parameters in same format and sequence of strategies tab.

    Thanks,
    Dan

    #2
    Hello Danville.Sumobay,

    Thanks for opening the thread.

    I am not aware of a way to cycle thorough the strategy parameters, but you can access these members by referencing the strategy variable.

    The post below gives examples of how to reference many of these parameters.

    --- Data Series
    this.BarsPeriod.Value.ToString(); //Type
    this.BarsPeriod.Id; // Value
    this.Instrument.ToString(); //Instrument

    --- Time Frame
    this.Days2Load.ToString(); // Days to load
    this.SessionData.ToString(); // Session Template

    --- General
    this.Account.Name; //Account
    this.StrategyData.Strategy.CalculateOnBarClose // Calculate on Bars Close
    this.Name; //Label
    this.MaximumBarsLookBack.ToString(); //Maximum bars look back
    this.BarsRequired.ToString(); //Min Bars Required

    --- Historical Fill Processing
    this.FillType.ToString(); //Fill type
    this.Slippage.ToString(); //Slippage

    --- Order Handling
    this.EntriesPerDirection.ToString(); //Entries per direction
    this.EntryHandling.ToString(); //Entry Handling
    this.ExitOnClose.ToString(); // Exit on Close
    this.ExitOnCloseSeconds.ToString(); // Exit on Close Seconds
    this.StopTargetHandling.ToString(); //Stop & Target Submission
    this.SyncAccountPosition.ToString(); //Sync Account Position

    --- Order properties
    this.QuantityType.ToString(); //Set Order Quantity
    this.AccountSize.ToString(); // Account Size (for Order Quantity by account size)
    this.DefaultQuantity.ToString(); // Default quantity (for Order quantity by default)
    this.TimeInForce.ToString(); //Time in Force


    If the above does not resolve your inquiry, please elaborate on what exactly you are trying to accomplish by cycling through the parameters so I may assist you further.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thank you Jim!

      I had figured out.

      On my attached image, I tried to collect all the custom parameters, not the example you have provided - but anyway that is still informative and may needed for future development of my strategy


      Dan

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by love2code2trade, 04-17-2024, 01:45 PM
      4 responses
      31 views
      0 likes
      Last Post love2code2trade  
      Started by cls71, Today, 04:45 AM
      2 responses
      10 views
      0 likes
      Last Post eDanny
      by eDanny
       
      Started by proptrade13, Today, 11:06 AM
      0 responses
      2 views
      0 likes
      Last Post proptrade13  
      Started by kulwinder73, Today, 10:31 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by RookieTrader, Today, 09:37 AM
      3 responses
      15 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X