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

Orderflow Indicator attaching to chart

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

    Orderflow Indicator attaching to chart

    Hello,

    I wanted to add the orderflow cumulative delta indicator chart to a range chart and so I did in strategy builder select the conditions eg
    (OrderFlowCumulativeDelta1.DeltaClose[0] > (OrderFlowCumulativeDelta1.DeltaHigh[1] ) ) /this line gave me the strategy builder
    for comparing the cumulative Delta Close of Current bar with the High of the bar before. But it doesnt plot.

    So I added the volumetric dataseries to the indicator same as I do for strategies with
    if (barsType.Volumes[CurrentBar].CumulativeDelta > barsType.Volumes[CurrentBar-1].CumulativeDelta)
    and this works.

    * Does this mean one has to add always the volumetric dataseries to an indicator for working with the cumulative delta?

    * And if so, is there a possibility to have in the indicator for the added volumentric dataseries always the same dataseries as the chart is plotting?
    (otherwise one has to set in the code of the indicator for every chart needed the indicator the appropriate dataseries).

    * And an additional question in this concern please: is it possible to work with the high, low, open and close of the cumulative delta bars?
    for example like "if(low of current delta bar < low of delta bar before...)"
    (I dont see it there: https://ninjatrader.com/support/help...tric_bars2.htm)

    Thank you!
    Tony
    Last edited by tonynt; 07-12-2019, 02:03 PM. Reason: add question

    #2
    Hello tonynt,

    Thanks for your post.

    The OrderFlowCumulativeDelta indicator adds a single tick data series for volume analysis, not to be confused with Volumetric Bars. Any script that adds the OrderFlowCumulativeDelta Indicator must also add a single tick data series. The script does add the data series, but we must remember the NinjaScript rule that any hosted indicator that has an added data series must also have the data series added by the hosting script.

    To have this plot from a strategy built with the Strategy Builder, please ensure "Plot On Chart" is selected with that indicator and you are not receiving any errors in the log tab of the Control Center.

    Within the Strategy Builder you can select DeltaOpen, DeltaHigh, DeltaLow and DeltaClose from "Value Plot" to reference these data points from the OrderFlowCumulativeDelta bars.

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. Sorry, but I do not understand whats wrong here and why it doesnt plot the arrows. I attach this simple code.

      else if (State == State.DataLoaded)
      {
      OrderFlowCumulativeDelta1 = OrderFlowCumulativeDelta(Close, NinjaTrader.NinjaScript.Indicators.CumulativeDelta Type.BidAsk, NinjaTrader.NinjaScript.Indicators.CumulativeDelta Period.Session, 0);
      }

      protected override void OnBarUpdate()
      {
      if (BarsInProgress != 0)
      return;

      if (CurrentBars[0] < 1)
      return;

      // Set 1
      if ((OrderFlowCumulativeDelta1.DeltaLow[0] < OrderFlowCumulativeDelta1.DeltaLow[1])
      && (Close[0] < Close[1]))
      {
      Draw.ArrowDown(this, @"TxCDv11 Arrow down_1" + CurrentBar, false, 0, 0, Brushes.Red);
      }

      }

      Thank you!
      Tony

      Comment


        #4
        Hello tonynt,

        A single tick data series must be added to the hosting script (your strategy) in order for OFCD to be hosted in that script.

        Please see the attached export.

        I look forward to being of further assistance.
        Attached Files
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        26 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, Yesterday, 09:53 PM
        2 responses
        49 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        192 views
        0 likes
        Last Post Hasadafa  
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,234 views
        0 likes
        Last Post xiinteractive  
        Working...
        X