Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add bars when one bar closes above or below the high or low of prior bar

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

    Add bars when one bar closes above or below the high or low of prior bar

    I am trying to make an indicator that counts when a bar closes above or below the prior bar's low or high? Is there an indicator that can be used within the Strategy Builder to do what I want it to do? Thank you.

    #2
    Hello james79, thanks for your post and welcome to the NinjaTrader forum.

    I attached an indicator that counts all bars within a session that closed below the previous Low and above the previous High just as a starting example. This can also be used in the builder because of the added plot. See here for documentation on all available price series including an example:
    https://ninjatrader.com/support/help...riceseries.htm

    If you are just beginning NinjaScript work, please also see this guide going over documentation and educational resources:

    https://ninjatrader.com/support/foru...sample-scripts

    Kind regards,
    -ChrisL

    Attached Files

    Comment


      #3
      Hello james79, thanks for your reply.

      I apologize but I will not be able to make new code and examples. This is so that we can provide the same high level of service to all of our clients. We recommend those creating NinjaScript be at least intermediate to advanced level in C# programming level before beginning to code in NinjaScript. If you have specific questions that I can help with I will be happy to help out.

      Kind regards.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      41 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X