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 Max238, Today, 01:28 AM
      5 responses
      42 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by giulyko00, Yesterday, 12:03 PM
      3 responses
      12 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by habeebft, Today, 07:27 AM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_ChristopherS  
      Started by AveryFlynn, Today, 04:57 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by r68cervera, Today, 05:29 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X