Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Proper way to match the same value coming from Order Flow Cumlative Delta bar mode?

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

    Proper way to match the same value coming from Order Flow Cumlative Delta bar mode?

    I created a delta variable that displays OnMarketData(). My Delta shows drastically different number than the OrderFlowCumlativeDelta Indicator in bar mode. An example right now I'm looking at mine showing a value of 1342 and the same indicator in a panel below is showing 106 both positive. Most of the time it tracks the right direction but is always much larger. If I remove the += and make it just =, it only shows 1 or 2 neg or pos.


    // Relevant Code
    protected OrderFlowCumulativeDelta CumulativeDelta;
    protected double Delta;


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


    protected override void OnBarUpdate()
    {
    Delta = 0;
    // Other code
    }


    protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
    {
    base.OnMarketData(marketDataUpdate);
    if (CurrentBars[2] > -1)
    {
    Delta += OrderFlowCumulativeDelta(BarsArray[2], CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Bar, 0).DeltaClose[0];
    }
    }

    Thanks in advance!

    #2
    Hello jalley,

    The Orderflow indicators require the structure shown in the help guide samples. I don't see that you have done that in this sample, if you are not making the code look like the sample in the following page that may be part of the problem: https://ninjatrader.com/support/help...umulativeDelta
    The indicators need to use OnBarUpdate to call the inciator from BarsInProgress 1.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I have it resolved but not in the way the documentation shows because it doesn't update realtime. I found a way to get it to update realtime;
      Last edited by jalley; 02-26-2021, 02:53 PM. Reason: Resolved it

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by bofygym7, 04-09-2021, 05:40 PM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by honest-trader, Today, 01:25 PM
      2 responses
      5 views
      0 likes
      Last Post honest-trader  
      Started by ttodua, Today, 03:05 PM
      0 responses
      2 views
      0 likes
      Last Post ttodua
      by ttodua
       
      Started by TigerKiger, Today, 01:12 PM
      0 responses
      12 views
      1 like
      Last Post TigerKiger  
      Started by tonynt, Today, 12:46 PM
      0 responses
      7 views
      0 likes
      Last Post tonynt
      by tonynt
       
      Working...
      X