Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Saving data before and after f5

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

    Saving data before and after f5

    Hey guys, im developing an indicator in which i draw a couple of things in a chart, according to OrderFlowCumulativeDelta and a couple of other indicators. OrderFlowCumulativeDelta only works on the last bars in the chart upon a refresh or opening a new chart (i think), because my datafeed doesn't support historical stamped tick data. However i often refresh or add/remove indicators, and all my drawings get erased, and do not get redrawn since the data they used is now lost. I was wondering if there was any other solution other than saving the coordinates of the drawn objects in a file at chart.close and reading them on a chart.open, because this seems fairly complex and would probably take me a couple days.
    Thanks on advance.

    #2
    Hello Iau Stormtech,

    Thank you for your post.

    To plot historically with Delta type Bid Ask requires historical bid ask stamped tick data. You can select to record incoming live data as historical data and this may help with your issue. To record incoming live data as historical, go to Tools > Options > Market Data > Check "Record Live Data As Historical".

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Hey Kate, Thanks for the reply. If that worked that would be awesome, however i can't seem to get it to work. I've tried recording live data as historical, but i see no change in the Order Flow Cumulative Delta indicator. I am attaching screenshots of the dataseries and the indicator settings I'm using, the datafeed is coinbase.com Click image for larger version

Name:	image.png
Views:	149
Size:	31.5 KB
ID:	1216090Click image for larger version

Name:	image.png
Views:	111
Size:	41.4 KB
ID:	1216091​​

      Comment


        #4
        Hello lauStormtech,

        Thank you for your reply.

        Coinbase can use NinjaTrader's historical data servers which would provide historical tick data for BTCUSD. Please check to ensure that under Connections > Configure > your Coinbase connection that the box is checked next to NinjaTrader Historical Data server is checked.

        Thanks in advance; I look forward to assisting you further.


        Comment


          #5
          Hey Kate, I have that setting on, but it still doesn't work. However, I realized Order Flow Cumulative Delta works properly when i have set the dataseries as type: Tick. With this, I can use it in my indicator by adding another DataSeries of type tick, and setting the indicator Order Flow Cumulative Delta to read from that dataseries. However, I'm not 100% sure on how to achieve this. I will probably figure it out, but if you know how to do it, I would appreciate it. This is the code i have right now
          Code:
                      else if (State == State.Configure)
                      {
                          AddDataSeries(Data.BarsPeriodType.Tick, 1);​
                      }
                      else if (State == State.DataLoaded)
                      {
                           this.cumulativeDelta = OrderFlowCumulativeDelta(CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Bar, 0);
                       }
          .
          .
          .
                  protected override void OnBarUpdate()
                  {
                      if (BarsInProgress == 0)
                      {
                          //code to draw according to cumulative delta
                      }
                      else if (BarsInProgress == 1)
                      {
                          cumulativeDelta.Update(cumulativeDelta.BarsArray[1].Count - 1, 1);
                      }
                  }​
          ​

          Comment


            #6
            Hello Iau Stormtech,

            Thank you for your reply.

            You have to add a single tick series to a script if you're going to be calling the Cumulative Delta because it runs off tick data. Please see this page of our help guide which illustrates:



            Please let us know if we may be of further assistance to you.

            Comment


              #7
              Ok, so I've finally figured out the problem. When i add the dataseries, it takes the same 'barstoload' as the original dataseries of the chart. Because that dataseries is of a different timescale (1 tick vs lets say 200 range) this results in only getting data for a fraction of the chart. So, when i add a dataseries I want it to take data as far back as the beginning (most-left) part of the chart. Is this possible?

              Comment


                #8
                Hello Iau Stormtech,

                Thank you for your reply.

                I would suggest loading the data based on days to load instead of bars to load. That way it will load the full chart of data for the added data series as well.

                Please let us know if we may be of further assistance to you.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                655 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                370 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                109 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                574 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                577 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X