• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 Dan_D_Trader, Today, 03:29 PM
    0 responses
    1 view
    0 likes
    Last Post Dan_D_Trader  
    Started by Bsmckm, Today, 02:02 PM
    0 responses
    8 views
    0 likes
    Last Post Bsmckm
    by Bsmckm
     
    Started by markyb0y, Today, 01:55 PM
    0 responses
    4 views
    0 likes
    Last Post markyb0y  
    Started by SlickRick, Today, 11:07 AM
    2 responses
    10 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by JTizz, Today, 12:17 PM
    0 responses
    7 views
    0 likes
    Last Post JTizz
    by JTizz
     
    Working...
    X