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

how to load historical cumulative volume delta

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

    how to load historical cumulative volume delta

    I have an indicator that plots cumulative delta from the beginning of when it is loaded. How can I have it load historical volume delta data going back to the start of the session?

    #2
    Hello brucelevy,

    Does your script add a 1 tick ask and 1 tick bid series with the Add() method?

    If so, these should be loading if the data historically if the data provider provides historical bid and ask tick data.

    Who are you connecting to for data? (This is indicated in green in the lower left corner of the Control Center)
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I am using CQG, no I am not using the add tick method. I am using onMarketData to plot the buys and sell at the bid ask.

      Comment


        #4
        Hello brucelevy,

        Unfortunely, OnMarketData() does not get called historically.

        From the help guide:
        "This method is not called on historical data (backtest)"

        Below is a publicly available link to the help guide.


        You will need to add the data historically with a 1 tick ask and 1 tick bid series.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I am looking to plot the historical accumulated delta in an indicator window like so


          Are you saying to add the tick series then use the buys and sells from the delta as the input for plotting the historical delta? An example would be great if possible. Thank you.

          Comment


            #6
            Hello brucelevy,

            The OnMarketData method runs only when a tick is received in real-time. This will also know if it was at the ask or the bid.

            This method does not run historically.

            If you want ask and bid tick data historically you need to add a 1 tick ask and 1 tick bid series and perform these calculations in OnBarUpdate().

            Below is a link to an example that adds a 1 tick series.
            You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ZenCortexCLICK, Today, 04:58 AM
            0 responses
            5 views
            0 likes
            Last Post ZenCortexCLICK  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            172 responses
            2,280 views
            0 likes
            Last Post sidlercom80  
            Started by Irukandji, Yesterday, 02:53 AM
            2 responses
            17 views
            0 likes
            Last Post Irukandji  
            Started by adeelshahzad, Today, 03:54 AM
            0 responses
            5 views
            0 likes
            Last Post adeelshahzad  
            Started by Barry Milan, Yesterday, 10:35 PM
            3 responses
            13 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X