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

Capturing all attributes from previously formed bar

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

    Capturing all attributes from previously formed bar

    Can you kindly show me the NT documentation on bar value capturing?
    I'm looking to capture all values.......not just the high/low/open/close.

    I'm talking about the symbol, the contract month, the contract year (if its a future).
    For example if I'm trading Oil futures, I want to capture the following and send to an excel file (or any file output):
    -symbol name CL 03-14 (Crude oil, March 2014 contract)
    -high of the previous formed bar (98.50, for example)
    -low of the previous formed bar (98.25, for example)

    so the following values would be sent to my output file:

    CL 03-14
    98.50
    98.25

    Please let me know where I can find such documentation on capturing and referencing previously formed bars.

    Thank you.

    #2
    Hello Theitpro,

    Thank you for your post.

    You can use Instrument.FullName to give the strings full name of the instrument including contract.

    Additionally, to get the previous bars values you will need to reference a 1 in the bat index value

    High[1], Close[1], Open[1], Low[1]

    http://www.ninjatrader.com/support/h...t_fullname.htm
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bmartz, Today, 09:30 AM
    2 responses
    11 views
    0 likes
    Last Post bltdavid  
    Started by f.saeidi, Today, 11:02 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by geotrades1, Today, 10:02 AM
    4 responses
    12 views
    0 likes
    Last Post geotrades1  
    Started by rajendrasubedi2023, Today, 09:50 AM
    3 responses
    16 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by lorem, Today, 09:18 AM
    2 responses
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X