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

I need to Add() another Bars object to the same instrument

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

    I need to Add() another Bars object to the same instrument

    I need to add to the same instrument, another Bars object, where only changes "marketDataType".
    For example I want to add all bid data to the script. According to NT help guide, this should go like this: Add(PeriodType periodType, int period). The problem with this is that doesn't allow "marketDataType" , so I can't add what I want.

    How can I solve this?
    by Add(string instrumentName, PeriodType periodType, int period, MarketDataType marketDataType) and under instrumentName put the same?

    Is there other any way to Add a simple Bid series ?
    I'd like to know which is best way to do this.

    Thanks

    #2
    Hello,

    If you want to just add the Ask or Bid for the instrument you could use the following:

    Code:
    Add(Instrument.FullName, PeriodType.Tick, 1, MarketDataType.Ask);
    or a string name:
    Code:
    Add("ES 12-15", PeriodType.Tick, 1, MarketDataType.Ask);
    This would Add the instrument as 1 tick Ask series.

    You could do the same for Bid choosing any Period and Interval you need.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by port119, Today, 02:43 PM
    0 responses
    0 views
    0 likes
    Last Post port119
    by port119
     
    Started by Philippe56140, Today, 02:35 PM
    0 responses
    2 views
    0 likes
    Last Post Philippe56140  
    Started by 00nevest, Today, 02:27 PM
    0 responses
    1 view
    0 likes
    Last Post 00nevest  
    Started by Jonafare, 12-06-2012, 03:48 PM
    5 responses
    3,986 views
    0 likes
    Last Post rene69851  
    Started by Fitspressorest, Today, 01:38 PM
    0 responses
    2 views
    0 likes
    Last Post Fitspressorest  
    Working...
    X