• 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

strategy volumetric dataseries

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

    strategy volumetric dataseries

    Hello,

    comparing using volumetric dataseries for bidask-analysis and OFcumulativeDelta I want to ask please if my understanding is correct that
    when running a script-strategy in a chart with volumetric dataseries as primary dataseries of the chart one has not to add volumetric in state.configure?

    Compared to OFcumulativeDelta that has to be added in state.configure with 1 Tick even when using it on the dataseries of the chart. But what if OFcumulativeDelta should be calculating with another dataseries? eg one trades the MNQ but the OFcumulativeDelta should be calculating in the script with NQ? Is it correct to have in state.configure AddDataSeries("NQ 03-20", BarsPeriodType.Tick, 1);?
    Is it then correct to have in state.dataloaded referring to state configure AddDataSeries("NQ 03-20", BarsPeriodType.Tick, 1):
    OrderFlowCumulativeDelta1 = OrderFlowCumulativeDelta(Closes[1], NinjaTrader.NinjaScript.Indicators.CumulativeDelta Type.BidAsk, NinjaTrader.NinjaScript.Indicators.CumulativeDelta Period.Session, 0);

    (this is not clear from the sample in the helpguide because there is only the primary dataseries)

    Thank you!
    Tony
    Last edited by tonynt; 01-22-2020, 07:03 AM. Reason: clearifying question

    #2
    Hello tonynt,

    Thanks for your post.

    "...when running a script-strategy in a chart with volumetric dataseries as primary dataseries of the chart one has not to add volumetric in state.configure?" Correct, however with reference to the example in the help guide, the example shows that when the Volumetric bars are the chart bars, you would only need to add (In OnBarUpdate()):
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;

    Reference: https://ninjatrader.com/support/help...tric_bars2.htm

    Regarding, "Compared to OFcumulativeDelta that has to be added in state.configure with 1 Tick even when using it on the dataseries of the chart. But what if OFcumulativeDelta should be calculating with another dataseries? eg one trades the MNQ but the OFcumulativeDelta should be calculating in the script with NQ? Is it correct to have in state.configure AddDataSeries("NQ 03-20", BarsPeriodType.Tick, 1);?
    Is it then correct to have in state.dataloaded referring to state configure AddDataSeries("NQ 03-20", BarsPeriodType.Tick, 1):
    OrderFlowCumulativeDelta1 = OrderFlowCumulativeDelta(Closes[1], NinjaTrader.NinjaScript.Indicators.CumulativeDelta Type.BidAsk, NinjaTrader.NinjaScript.Indicators.CumulativeDelta Period.Session, 0);"
    You would need to add the NQ bars that you want the cumulative delta of AND add the NQ 1 tick series to support the indicator. So with reference to your example, lets assume you have a chart of 1 minute MNQ. In the code you would add a 1 tick series of MNQ for the indicator. Lets further assume you want the 1 minute NQ, so you would also have to add 1 minute NQ and 1 tick series of NQ. This means you would be adding 3 data series to your script. The help guide shows the syntax for the indicator as:
    Syntax:
    OrderFlowCumulativeDelta(CumulativeDeltaType deltaType, CumulativeDeltaPeriod period, int sizeFilter)
    OrderFlowCumulativeDelta(ISeries<double> input, CumulativeDeltaType deltaType, CumulativeDeltaPeriod period, int sizeFilter)


    This is showing that you can use the 2nd overload method that allows you to specify the input data series which would be the NQ 1 minute bars.

    In the OnBarUpdate(), as the example in the help guide shows, you would need to segment by the bars in progress to then update each of the two uses (in this example).

    Reference: https://ninjatrader.com/support/help...ive_delta2.htm
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by swcooke, Today, 09:09 AM
    0 responses
    1 view
    0 likes
    Last Post swcooke
    by swcooke
     
    Started by Uregon, Today, 09:08 AM
    0 responses
    3 views
    0 likes
    Last Post Uregon
    by Uregon
     
    Started by Induna, Today, 08:44 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by TangoTX, Today, 08:36 AM
    1 response
    1 view
    0 likes
    Last Post NinjaTrader_Tyler  
    Started by abdullah, 11-15-2017, 08:44 PM
    11 responses
    822 views
    0 likes
    Last Post NinjaTrader_Kate  
    Working...
    X