Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Volumetric Bars and Order Fill Resolution

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

    Volumetric Bars and Order Fill Resolution

    Hi Support,

    I created a strategy that works with volumetric bars, because I need to get bid and ask info from the bar. This is how I am doing this:

    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;

    double bidLow = barsType.Volumes[CurrentBar].GetBidVolumeForPrice(Low[0]);

    So far so good. My footprint chart where I apply this strategy is of Type Volumetric, Base Period Type Range, Base Period Time 5.

    Now, when I backtest the strategy with Order Fill Resolution = Standard I get very different results than running with the High Resolution. Why is that? The Standard resolution won't read the bid and ask for every price level that I have on the chart?

    Also, I added a new dataseries to the strategy and now I can't use the High resolution anymore. Is there any work around for this?

    AddDataSeries("^VIX", Data.BarsPeriodType.Minute, 10);

    Regards,
    Juliano

    #2
    Hello Juliano,

    Welcome to the NinjaTrader forums!

    Add a 1 tick series for intra-bar granularity and submit orders to the BarsInProgressIndex of that 1 tick series.

    Return in OnBarUpdate() if BarsInProgress is not the primary series 0.

    if (BarsInProgress != 0)
    return;

    Below is a link to a forum post that links an example.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      Thanks for the prompt response! To be honest I don't really understand how using a secondary data series with Tick has fixed the issue, but it did!

      Just to document for other users here is what I did:

      else if (State == State.Configure)
      {
      AddDataSeries(Data.BarsPeriodType.Tick, 1);
      }​

      if (BarsInProgress != 0)
      return;​

      // first param is BarsInProgressIndex set to the secondary Tick data series
      EnterLong(1, 1, "Long1");

      Comment


        #4
        Hello tietzmann,

        The 1 tick series provides the proper tick data for the orders to get valid prices to fill with.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        54 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        130 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        72 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        44 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X