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

using OrderFlowCumulativeDelta programmatically?

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

    using OrderFlowCumulativeDelta programmatically?

    Hello,

    I am trying to start using OrderFlowCumulativeDelta indicator that comes with NinjaTrader lifetime license.

    I was using "Strategy Builder" to add a simple script to start using this Ninja indicator.

    It seems to work fine and run fine in Strategy Analyzer (if I run it on 1 tick series or probably add 1 tick series as additional series), however, Visual Studio 2017 shows a popup syntax error "Non-invokable member OrderFlowCumulativeDelta cannot be used like a method". Method, delegate or event is expected."

    Any idea what causes it and how to avoid this error in Visual Studio?

    I have attached a sample script and an error image.

    p.s. I also have another 3rd party custom indicator that gives same popup syntax error in Visual Studio but it also gives compile error in NinjaTrader with error: InddicatorX is a 'type' but is used like a 'variable' (I am trying to work with that vendor, but was wondering if you know why it occurs and how to workaround or fix it)...

    Thanks
    Attached Files
    Last edited by music_p13; 07-27-2018, 05:23 PM.

    #2
    Originally posted by music_p13 View Post
    Hello,

    I am trying to start using OrderFlowCumulativeDelta indicator that comes with NinjaTrader lifetime license.

    I was using "Strategy Builder" to add a simple script to start using this Ninja indicator.

    It seems to work fine and run fine in Strategy Analyzer (if I run it on 1 tick series or probably add 1 tick series as additional series), however, Visual Studio 2017 shows a popup syntax error "Non-invokable member OrderFlowCumulativeDelta cannot be used like a method". Method, delegate or event is expected."

    Any idea what causes it and how to avoid this error in Visual Studio?

    I have attached a sample script and an error image.

    p.s. I also have another 3rd party custom indicator that gives same popup syntax error in Visual Studio but it also gives compile error in NinjaTrader with error: InddicatorX is a 'type' but is used like a 'variable' (I am trying to work with that vendor, but was wondering if you know why it occurs and how to workaround or fix it)...

    Thanks
    Did you assign the indicator name in variables? Does it work if you use the other syntax?

    Code:
    orderflowindicatorname                            = OrderFlowCumulativeDelta(CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Bar, 0);
    Last edited by liquid150; 07-28-2018, 06:48 AM.

    Comment


      #3
      Originally posted by liquid150 View Post
      Did you assign the indicator name in variables? Does it work if you use the other syntax?

      Code:
      orderflowindicatorname                            = OrderFlowCumulativeDelta(CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Bar, 0);
      https://ninjatrader.com/support/help...ive_delta2.htm
      With regards to OrderFlow, I have tried example from Guide (link you have provided); I am getting same syntax error in Visual Studio 2017 editor, although it compiles and works fine in Ninja Editor / Strategy Analyzer... Just wondering why VS 2017 editor gives this syntax error...

      I feel like if "Ninja Generated code" part is missing in OrderFlow indicator or is not properly visible from Visual Studio editor... so when trying to call that indicator from Visual studio it throws syntax error even though same code using Ninja Script Editor doesn't throw any of those errors... because the usual indicator box where we could pass in series doesn't show (when we use indicators like SMA we see both class type and another type where we can pass input series while that other type is missing with OrderFlowCumulativeDelta - see screenshots attached).

      Thanks
      Attached Files
      Last edited by music_p13; 07-28-2018, 09:33 AM.

      Comment


        #4
        Hello Music_p13,

        Thank you for your note.

        To get OrderFlowCumulativeDelta in VS,

        Open VS, Under Solution Explorer Click Show All Files.

        Scroll down to NinjaTrader.Vendor.CS right click on it, Include In Project.

        For the time being you will have to do this every time you compile.

        I have attached screen shots of directions.

        Please let us know if you need further assistance.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Alan,

          That has fixed the Visual Studio issue with Order Flow indicator.

          I just wanted to ask additional question (while I am waiting for the answer from 3rd party vendor) - I am trying to add their indicator (I have referenced their DLL) but in NinjaScript editor I am getting following error: "IndicatorX" is a 'type' but is used like a 'variable'
          and in Visual Studio it shows error: "Non-invokable member "IndicatorX" cannot be used like a method". Method, delegate or event is expected."

          Thanks again!

          Comment


            #6
            Hello music_p13,

            I would suggest reaching out to the vendor as its possible they do not allow you to reference the indicator.

            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              Vendor was able to fix the issue.

              Thanks

              Comment


                #8
                Originally posted by music_p13 View Post
                Hello,

                I am trying to start using OrderFlowCumulativeDelta indicator that comes with NinjaTrader lifetime license.

                Thanks

                By this do you mean you have to have a lifetime license to be able to use OrderFlowCumulativeDelta?


                Thanks,
                buzz

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by CortexZenUSA, Today, 12:53 AM
                0 responses
                1 view
                0 likes
                Last Post CortexZenUSA  
                Started by CortexZenUSA, Today, 12:46 AM
                0 responses
                1 view
                0 likes
                Last Post CortexZenUSA  
                Started by usazencortex, Today, 12:43 AM
                0 responses
                5 views
                0 likes
                Last Post usazencortex  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                168 responses
                2,265 views
                0 likes
                Last Post sidlercom80  
                Started by Barry Milan, Yesterday, 10:35 PM
                3 responses
                11 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Working...
                X