Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What's a bar?

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

    What's a bar?

    I've read the both the normal and the programmer help guide but I still don't understand what a bar is. For context, I'm very new to ninjatrader 8 and I'm using the strategy builder through the UI (not the code). Ex: for the conditions on any indicator it says under "general," "bars ago." Or for the "crosses above" it says "look back period."

    Additional questions:
    How do I tell ninjatrader to execute an action after x number of days and also if an indicator has hit a value within the past x days?
    What are the inputs and variables used for? Could you please give me an example on how to use them?


    Thanks.

    #2
    Hello MercuryRed,

    Thanks for for your post and welcome to the NinjaTrader forums!

    You will find, regardless of platform, that bar and candlestick are used to essentially mean the same thing. Simply the representation of price movement within either a specified time or a specified unit, examples are Minute bars or Volume bars. Candlesticks are a chart style type however there are several others such as OHLC bars. reference: https://ninjatrader.com/support/help...art_styles.htm

    In NinjaTrader, the bar/candlestick that is currently being processed by your strategy would be referred to as the "current bar" and the current bar has a "bars ago" value of [0]. The previously closed bar would be [1] bar ago, the bar before that would be [2] and so on.

    Inputs would be used for anything that you wish to change when you apply the strategy without having to rebuild the strategy. An example would be if you wanted to set a certain stoploss value when the strategy is applied to different instruments. Another example is to set specific trading times.

    Variables are internally used variables that you can store information in or set the state of. An example would be a "bool" type variable that is either true or false. A "double" type variable would be used to hold the price of something such as a particular bars high or low or an indicator value at a specific time.

    The strategy builder does have some limitation and not all conditions you might think of can be accomplished. For these type questions, "How do I tell ninjatrader to execute an action after x number of days and also if an indicator has hit a value within the past x days?" You may need to unlock the strategy and work directly in code.

    I would suggest taking advantage of these resources to help your learning of the strategy builder:

    Free live webinar every other Thursday at 4:00 PM EST, through this link to all webinars: https://ninjatrader.com/PlatformTraining
    Previous recording of the Strategy Builder 301 webinar: https://youtu.be/HCyt90GAs9k?list=PL...auWXkWe0Nf&t=2
    Help guide for the strategy builder: https://ninjatrader.com/support/help...gy_builder.htm

    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by BarzTrading, Today, 07:25 AM
    1 response
    9 views
    1 like
    Last Post NinjaTrader_Clayton  
    Started by EB Worx, 04-04-2023, 02:34 AM
    7 responses
    161 views
    0 likes
    Last Post VFI26
    by VFI26
     
    Started by Mizzouman1, Today, 07:35 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Radano, 06-10-2021, 01:40 AM
    20 responses
    616 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by i019945nj, 12-14-2023, 06:41 AM
    6 responses
    69 views
    0 likes
    Last Post i019945nj  
    Working...
    X