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

Order Flow VWAP No Session Breaks on Historical

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

    Order Flow VWAP No Session Breaks on Historical

    Hello,

    I have a strategy that uses Calculate.OnEachTick and Order Flow VWAP using VWAPResolution.Tick added inside the strategy. The strategy works well with the indicator when using Realtime data feed from IB, but the VWAP indicator breaks during historical processing (no session resets occur) since IB doesn't have historical tick data. Because the strategy uses VWAP for certain calculations, it is important that the VWAP bands reset at the beginning of each session and not where Historical transitions to Realtime. In the screen shots below, the one that has no historical tick data doesn't see the session breaks but the one with tick data resets correctly at the end of every session.

    I have tested that the Order Flow VWAP indicator correctly resets on the session breaks with Calculate.OnBarClose and Standard resolution for historical non-tick feeds, however this isn't the setting I want for the strategy.

    I'd like to know if there is a way to use Order Flow VWAP so it shows the session breaks properly when using historical non-tick data and then transition to using tick data when entering Realtime mode so the strategy can have the granularity it needs.

    I have also attached some bare-bones code I have been using for testing this issue.


    NT8 Version 8.0.24.1 - 64bit
    Screenshots show:
    Tick Replay = Disabled
    Trading Hours = US Equitues ETH
    Datafeed has no tick data (IB)


    Screenshot #1 has OFVwap resolution = Tick and Strategy set to Calculate.OnEachTick

    Screenshot #2 has OFVwap resolution = Standard and Strategy set to Calculate.OnBarClose


    Any insights you have would be great. Thanks!
    Attached Files

    #2
    Hello CCLQMT,

    Thanks for your post.

    There is not a way to set the resolution to tick/standard specifically for historical data, and if we are using a resolution of tick, we would need the historical tick data for the indicator to function properly.

    Something you could consider, would be to create a shell indicator that adds plots to display each VWAP line, and then within that indicator, add a standard resolution and a tick based resolution VWAP. You could then plot the standard resolution in the shell indicator with if(State == State.Historical) and the tick resolution with realtime.

    Please let us know if there is anything else we can do to help.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Kaledus, Today, 01:29 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by frankthearm, Yesterday, 09:08 AM
    13 responses
    45 views
    0 likes
    Last Post frankthearm  
    Started by PaulMohn, Today, 12:36 PM
    2 responses
    16 views
    0 likes
    Last Post PaulMohn  
    Started by Conceptzx, 10-11-2022, 06:38 AM
    2 responses
    55 views
    0 likes
    Last Post PhillT
    by PhillT
     
    Started by yertle, Yesterday, 08:38 AM
    8 responses
    37 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Working...
    X