Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Looking for OnTickUpdate

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

    Looking for OnTickUpdate

    Hello,

    I have a point in my strategy that must see changes on ticks.
    I saw something some time ago and I think it's possible, but I couldn't find any reference. I only found a sample @defaulttickfilter.cs file in \custom\type directory with a
    public override bool OnTick()
    , but I don't know how to use it.

    Any help appreciated.
    mcosta72
    NinjaTrader Ecosystem Vendor - Quant-Wise

    #2
    Hello mcosta72,

    Thank you for writing in. Could you please elaborate on what you are trying to do in your strategy so I may provide a more informed answer?

    Please see the OnMarketData() method which will provide you with every change in level 1 data that occurs in realtime:http://ninjatrader.com/support/helpG...marketdata.htm

    If you want to access historical tick data in your strategy, you can add a 1 tick data series.
    Code:
    Add(PeriodType.Tick, 1);
    If you add another data series and are new to working with multi-instrument or multi time frame strategies please make sure to read this document: http://ninjatrader.com/support/helpG...nstruments.htm

    Please let me know if I you have any questions.
    Last edited by NinjaTrader_MichaelM; 08-14-2015, 11:01 AM.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      Hi Michael,
      Thanks for your reply.
      My strategy looks for a reversal when I have a order "filled", BUT I dont want to wait til the bar is done. I'd like to make it right away. Code like:
      if (entryOrder[2].ToString() == "Filled" && GetAtmStrategyPositionQuantity(atmStrategyId).ToSt ring() != "0" && bla..bla..bla..meaning market changed -> reverse now. So I call:
      AtmStrategyClose(atmStrategyId);
      And create a new one. The point is, if I use OnMarketData() method, could it see my variables loaded at OnBarUpdate() method?

      Thanks!!
      mcosta72
      NinjaTrader Ecosystem Vendor - Quant-Wise

      Comment


        #4
        Originally posted by mcosta72 View Post
        Hi Michael,
        Thanks for your reply.
        My strategy looks for a reversal when I have a order "filled", BUT I dont want to wait til the bar is done. I'd like to make it right away. Code like:
        if (entryOrder[2].ToString() == "Filled" && GetAtmStrategyPositionQuantity(atmStrategyId).ToSt ring() != "0" && bla..bla..bla..meaning market changed -> reverse now. So I call:
        AtmStrategyClose(atmStrategyId);
        And create a new one. The point is, if I use OnMarketData() method, could it see my variables loaded at OnBarUpdate() method?

        Thanks!!
        I do not know where you get OnTickUpdate() from, but it is not NinjaTrader. If you want to process your code on every tick, the correct directive/property is
        Code:
        CalculateOnBarClose = false;

        Comment


          #5
          Thanks... both worked nice.
          mcosta72
          NinjaTrader Ecosystem Vendor - Quant-Wise

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          572 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          331 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          549 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          550 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X