Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access Instrument.Fullname from State.SetDefaults, or Configure?

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

    Access Instrument.Fullname from State.SetDefaults, or Configure?

    My spread indicator needs two dataseries. How can I set the first instrument to default to the instrument in Panel 1?
    I tried accessing Cbi.Instrument.FullName from state but to no avail.
    Please point me in the right direction.
    Thanks

    #2
    Hello funk101,

    By default, the primary instrument of the indicator will be the series that the indicator is added to and also by default this will be the data series in panel 1.

    Instrument.FullName, Closes[0], BarsInProgress 0, BarsArray[0], CurrentBars[0] will all refer to this primary instrument.

    Are you wanting to get the instrument of panel 2?
    Try using:
    Code:
    ChartControl.BarsArray[1].Bars.Instrument.FullName
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Tim-c, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post Tim-c
    by Tim-c
     
    Started by FrancisMorro, Today, 03:24 AM
    0 responses
    2 views
    0 likes
    Last Post FrancisMorro  
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,772 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    31 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    945 views
    0 likes
    Last Post spwizard  
    Working...
    X