Announcement

Collapse
No announcement yet.

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.

    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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      627 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      359 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      562 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      568 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X