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 burtoninlondon, Today, 12:38 AM
    0 responses
    5 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    14 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    13 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,983 views
    3 likes
    Last Post jhudas88  
    Working...
    X