Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order flow data

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

    Order flow data

    Quick question. I have a an indicator that uses order flow delta. My issue is that when I add it to the strategy. Declare private etc... Add to chart in the configure section..... the calculations are off by up to two bars at sometimes. When looking at the one on the chart as an indicator.. Vs the one added to the strategy and the executed. I looked at both on close and on tick. Is there a way to get the results closer...

    #2
    Hello richa61416,

    Thanks for your post.

    Are you using the Order Flow Cumulative Delta as documented where you are adding the Update() code in BarsInProgress == 1?

    With the above in mind, is s print for your added Order Flow Cumulative Delta indicator in the strategy match what is seen on the chart?



    We look forward to hearing from you.

    Comment


      #3
      Inside the indicator DeltaWickedTrendbid it is called from:

      else if (BarsInProgress == 1)
      {
      if (CurrentBar <30)
      return;
      cumulativeDelta.Update(cumulativeDelta.BarsArray[1].Count - 1, 1);

      }

      Then in the Strategy

      private DeltaWickedTrendbid DeltaWickedTrendbid1;
      …….

      else if (State == State.DataLoaded)
      {
      DeltaWickedTrendbid1= DeltaWickedTrendbid(Close);
      AddChartIndicator(DeltaWickedTrendbid1);
      }

      Should the strategy be set to on each tick when using OrderFlow data or it shouldn't matter?
      Attached Files

      Comment


        #4
        Hello richa61416,

        If Order Flow Cumulative Delta is calculating OnEachTick, you would want the host script calculating OnEachTick as well.

        I have attached an example demonstrating adding OFCD in an indicator, and adding that indicator in a strategy. When I print the output from the strategy running OnEachTick, also with OFCD on the chart calculating OnEachTick, my prints match.

        Attached Files

        Comment


          #5
          OK. thanks. I was assuming that the update for barinprogress==1 only had to be in the indicator. I will add it also the strategy and see if that bring me closer.

          Thanks.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          50 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          126 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          69 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X