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

Previous Bar Low, on a OnEachTick Strategy

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

    Previous Bar Low, on a OnEachTick Strategy

    Hello, I'm sorry if you guys already answered this before, however, I can't find it anywhere.

    I'm having a really hard time trying to get the low price of the previous bar on a Renko chart.
    I've already tried a few things like using the IsFirstTickofBar and the Bars[Bars.Count - 1], however, these two approaches
    only gives me the previous Tick value and not the previous bar Low. can you guys help me?

    Thank you in advance for your time!

    #2
    For Calculate.OnEachTick,
    use Low[0] for current low of the active bar currently being built,
    use Low[1] for the low of the most recently closed bar,
    use Low[2] for the low of the next most recently closed bar,
    etc, etc.

    Read this.

    Pay particular attention to the description of the 'Calculate' property.
    You need to understand Low[0] vs Low[1] and how the Calculate
    setting changes the sense of what the index means.
    Last edited by bltdavid; 12-08-2021, 08:41 PM.

    Comment


      #3
      If you wish to run your strategy with OnEachTick using Strategy Analyzer,
      you'll have to run it (I think) with TickReplay enabled.

      NT support will correct me if I'm wrong ...

      Comment


        #4
        bltdavid Thank you for your help mate it worked

        Comment


          #5
          Hello,

          Tick Replay can be used with the Strategy Analyzer to have the strategy take intrabar actions (process logic with Calculate.OnEachTick/OnPriceChange) but this will not allow for intrabar granularity with order fills.

          Tick Replay would need to be used in addition to submitting orders to a single tick data series to achieve intrabar actions, and intrabar order fills.

          An example demonstrating submitting orders to an additional data series for intrabar granularity is linked below.

          Backtesting with intrabar granularity - https://ninjatrader.com/support/help...ipt_strate.htm
          JimNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by AttiM, 02-14-2024, 05:20 PM
          12 responses
          213 views
          0 likes
          Last Post DrakeiJosh  
          Started by cre8able, 02-11-2023, 05:43 PM
          3 responses
          238 views
          0 likes
          Last Post rhubear
          by rhubear
           
          Started by frslvr, 04-11-2024, 07:26 AM
          8 responses
          117 views
          1 like
          Last Post NinjaTrader_BrandonH  
          Started by stafe, 04-15-2024, 08:34 PM
          10 responses
          47 views
          0 likes
          Last Post stafe
          by stafe
           
          Started by rocketman7, Today, 09:41 AM
          3 responses
          12 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X