• 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

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 dtl-saw, Today, 03:36 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by williamzz, Today, 02:04 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by jtrading82, Today, 01:55 PM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Tyler  
        Started by StevenNelson, Today, 01:00 PM
        4 responses
        19 views
        0 likes
        Last Post StevenNelson  
        Started by allinthechart, Today, 12:21 PM
        0 responses
        8 views
        0 likes
        Last Post allinthechart  
        Working...
        X