• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issues with "Order Flow Cumulative Delta" in Strategies

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

    Issues with "Order Flow Cumulative Delta" in Strategies

    I have been working on a strategy and wanted to integrate the "Order Flow Cumulative Delta" indicator into the logic.

    After coding, I found the results are inconsistent between having "Tick Replay" selected in the data series dialog box.

    With the Tick Replay unselected in the Data Series, I get the expected results with the attached test strategy. I have enclosed the full Data Series setting screenshot to assist in recreating the problem.

    Code:
    OFCDTest  0   m_OFCD.DeltaClose[0] = 0
    OFCDTest  1   m_OFCD.DeltaClose[0] = -4139
    OFCDTest  2   m_OFCD.DeltaClose[0] = -5645
    OFCDTest  3   m_OFCD.DeltaClose[0] = -6545
    OFCDTest  4   m_OFCD.DeltaClose[0] = -5519
    OFCDTest  5   m_OFCD.DeltaClose[0] = -5559
    OFCDTest  6   m_OFCD.DeltaClose[0] = -4613
    OFCDTest  7   m_OFCD.DeltaClose[0] = -3729
    OFCDTest  8   m_OFCD.DeltaClose[0] = -3775
    OFCDTest  9   m_OFCD.DeltaClose[0] = -3724
    OFCDTest  10   m_OFCD.DeltaClose[0] = -3498
    OFCDTest  11   m_OFCD.DeltaClose[0] = -3950
    OFCDTest  12   m_OFCD.DeltaClose[0] = -4276
    OFCDTest  13   m_OFCD.DeltaClose[0] = -4207
    OFCDTest  14   m_OFCD.DeltaClose[0] = -4890
    OFCDTest  15   m_OFCD.DeltaClose[0] = -6287
    OFCDTest  16   m_OFCD.DeltaClose[0] = -6383
    OFCDTest  17   m_OFCD.DeltaClose[0] = -6392
    OFCDTest  18   m_OFCD.DeltaClose[0] = -5093
    OFCDTest  19   m_OFCD.DeltaClose[0] = -3225
    OFCDTest  20   m_OFCD.DeltaClose[0] = -3756
    OFCDTest  21   m_OFCD.DeltaClose[0] = -4572
    OFCDTest  22   m_OFCD.DeltaClose[0] = -4784
    OFCDTest  23   m_OFCD.DeltaClose[0] = -6702
    OFCDTest  24   m_OFCD.DeltaClose[0] = -7071
    OFCDTest  25   m_OFCD.DeltaClose[0] = -5975
    OFCDTest  26   m_OFCD.DeltaClose[0] = -5538
    OFCDTest  27   m_OFCD.DeltaClose[0] = -3616
    OFCDTest  28   m_OFCD.DeltaClose[0] = -867
    OFCDTest  29   m_OFCD.DeltaClose[0] = -2804
    OFCDTest  30   m_OFCD.DeltaClose[0] = -1229
    OFCDTest  31   m_OFCD.DeltaClose[0] = -6331
    OFCDTest  32   m_OFCD.DeltaClose[0] = -11624
    OFCDTest  33   m_OFCD.DeltaClose[0] = -13622
    OFCDTest  34   m_OFCD.DeltaClose[0] = -19787
    OFCDTest  35   m_OFCD.DeltaClose[0] = -39596
    OFCDTest  36   m_OFCD.DeltaClose[0] = -37793
    OFCDTest  37   m_OFCD.DeltaClose[0] = -43574
    OFCDTest  38   m_OFCD.DeltaClose[0] = -42102
    OFCDTest  39   m_OFCD.DeltaClose[0] = -39034
    OFCDTest  40   m_OFCD.DeltaClose[0] = -46702
    OFCDTest  41   m_OFCD.DeltaClose[0] = -64500
    OFCDTest  42   m_OFCD.DeltaClose[0] = -68233
    OFCDTest  43   m_OFCD.DeltaClose[0] = -87547
    OFCDTest  44   m_OFCD.DeltaClose[0] = -88563
    Enabling NinjaScript strategy 'OFCDTest/103044245' :
    If I then select the "Tick Replay" option, the DeltaClose value is reported unexpectedly as 0 for each bar as follows:

    Code:
    OFCDTest  0   m_OFCD.DeltaClose[0] = 0
    OFCDTest  1   m_OFCD.DeltaClose[0] = 0
    OFCDTest  2   m_OFCD.DeltaClose[0] = 0
    OFCDTest  3   m_OFCD.DeltaClose[0] = 0
    OFCDTest  4   m_OFCD.DeltaClose[0] = 0
    OFCDTest  5   m_OFCD.DeltaClose[0] = 0
    OFCDTest  6   m_OFCD.DeltaClose[0] = 0
    OFCDTest  7   m_OFCD.DeltaClose[0] = 0
    OFCDTest  8   m_OFCD.DeltaClose[0] = 0
    OFCDTest  9   m_OFCD.DeltaClose[0] = 0
    OFCDTest  10   m_OFCD.DeltaClose[0] = 0
    OFCDTest  11   m_OFCD.DeltaClose[0] = 0
    OFCDTest  12   m_OFCD.DeltaClose[0] = 0
    OFCDTest  13   m_OFCD.DeltaClose[0] = 0
    OFCDTest  14   m_OFCD.DeltaClose[0] = 0
    OFCDTest  15   m_OFCD.DeltaClose[0] = 0
    OFCDTest  16   m_OFCD.DeltaClose[0] = 0
    OFCDTest  17   m_OFCD.DeltaClose[0] = 0
    OFCDTest  18   m_OFCD.DeltaClose[0] = 0
    OFCDTest  19   m_OFCD.DeltaClose[0] = 0
    OFCDTest  20   m_OFCD.DeltaClose[0] = 0
    OFCDTest  21   m_OFCD.DeltaClose[0] = 0
    OFCDTest  22   m_OFCD.DeltaClose[0] = 0
    OFCDTest  23   m_OFCD.DeltaClose[0] = 0
    OFCDTest  24   m_OFCD.DeltaClose[0] = 0
    OFCDTest  25   m_OFCD.DeltaClose[0] = 0
    OFCDTest  26   m_OFCD.DeltaClose[0] = 0
    OFCDTest  27   m_OFCD.DeltaClose[0] = 0
    OFCDTest  28   m_OFCD.DeltaClose[0] = 0
    OFCDTest  29   m_OFCD.DeltaClose[0] = 0
    OFCDTest  30   m_OFCD.DeltaClose[0] = 0
    OFCDTest  31   m_OFCD.DeltaClose[0] = 0
    OFCDTest  32   m_OFCD.DeltaClose[0] = 0
    OFCDTest  33   m_OFCD.DeltaClose[0] = 0
    OFCDTest  34   m_OFCD.DeltaClose[0] = 0
    OFCDTest  35   m_OFCD.DeltaClose[0] = 0
    OFCDTest  36   m_OFCD.DeltaClose[0] = 0
    OFCDTest  37   m_OFCD.DeltaClose[0] = 0
    OFCDTest  38   m_OFCD.DeltaClose[0] = 0
    OFCDTest  39   m_OFCD.DeltaClose[0] = 0
    OFCDTest  40   m_OFCD.DeltaClose[0] = 0
    OFCDTest  41   m_OFCD.DeltaClose[0] = 0
    OFCDTest  42   m_OFCD.DeltaClose[0] = 0
    OFCDTest  43   m_OFCD.DeltaClose[0] = 0
    OFCDTest  44   m_OFCD.DeltaClose[0] = 0
    Enabling NinjaScript strategy 'OFCDTest/103044245'
    I even tried a little magic to see if I could force the bar to update in the CD indicator as well (Code is commended out in strategy but here for reference):

    Code:
    			 m_OFCD.Dispatcher.InvokeAsync((Action)(() =>
    			{
    				m_OFCD.Update();
    			}));

    Is there a work-around to get this to work or something you guys can on in the indicators to call "Update()" before returning the Open/High/Low/Close data from this indicator?

    Thanks
    Attached Files

    #2
    Hello NJA_MC,

    I've made a test script and I was able to reproduce.

    I will report the behavior and provide the test script to our development.

    Once I have a tracking ID for this issue I will post this in this thread.

    I appreciate your patience.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello NJA_MC,

      Our development is letting me know this behavior should be corrected with the next release of NinjaTrader 8 (8.0.13.0).

      After 8.0.13.0 is released, please retest for this behavior and let me know if you are still able to reproduce.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        This has been corrected in V13, thank you Chelsea!

        Comment


          #5
          Hi NJA_MC,

          Thanks for testing for the behavior and confirming this was corrected.

          Please let me know of any other behavior you find that you feel is incorrect.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            I just detected another issue with OFCD I will start a new thread. Under indicators.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by asmmbillah, Today, 04:53 AM
            0 responses
            1 view
            0 likes
            Last Post asmmbillah  
            Started by davidnorton, Today, 04:29 AM
            0 responses
            2 views
            0 likes
            Last Post davidnorton  
            Started by maggie3, Today, 02:05 AM
            0 responses
            3 views
            0 likes
            Last Post maggie3
            by maggie3
             
            Started by qewcool, Today, 01:14 AM
            0 responses
            3 views
            0 likes
            Last Post qewcool
            by qewcool
             
            Started by fredrikn, 05-08-2019, 04:01 AM
            17 responses
            669 views
            1 like
            Last Post emtrader  
            Working...
            X