Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Identifying "Price Based On" value from parameters table

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

    Identifying "Price Based On" value from parameters table

    With a bit of work I've been able to locate the values for all of the elements in the Parameters table except one: the "Price Based On" value.

    I'm storing this information for each invocation of my strategies so that I can readily recreate the same set of parameters if I wish to do so.

    Can you please tell me how I can programmatically access the current value of the "Price Based On" field in the parameters table?

    Thanks.
    --------
    For the record, and for anyone else who wants to access this information, here are the other elements that I've found (many converted to strings for consistent reference). You need to assign these to an appropriate variable in order to actually use them:

    --- 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

    #2
    Cmt_Robert,

    Thank you for your post.

    This is unsupported programming with NinjaTrader, but this will work for getting the Price Based On -

    ChartControl.BarsArray[0].BarsData.Period.MarketDataType.ToString()

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thank you. I feel like a little kid who has just collected the whole set of baseball cards!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      649 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      370 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      576 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X