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 ftsc2022, 10-25-2022, 12:03 PM
    5 responses
    255 views
    0 likes
    Last Post KeyonMatthews  
    Started by ScottW, Today, 06:09 PM
    0 responses
    2 views
    0 likes
    Last Post ScottW
    by ScottW
     
    Started by Board game geek, 10-29-2023, 12:00 PM
    14 responses
    244 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Waxavi, 04-19-2024, 02:10 AM
    4 responses
    56 views
    0 likes
    Last Post sonia0101  
    Started by cmtjoancolmenero, Today, 03:58 PM
    0 responses
    9 views
    0 likes
    Last Post cmtjoancolmenero  
    Working...
    X