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

Darvas Question

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

    Darvas Question

    I have a question that pertains to a number of indicators but Darvas is a good example of my misunderstanding. Among other things, Darvas returns a bool BuySignal and bool SellSignal. In some of my code I try the following:

    if (Darvas(Close).SellSignal)
    {
    DrawArrowDown( etc.);
    }

    My problem is that I never get any DownArrows on my chart, at least on historical data. I haven't tried it on real time data.
    My DrawArrowDown code statement is OK because if I substitute true in the if statement then I get down arrows.

    I am wondering if I first need to check to see if my Darvas(Close).SellSignal contains a valid value before checking for true/false? If it doesn't contain a valid value then does my indicator throw an exception that prevents it from running properly?

    Darvas().BuySignal returns a bool and not a BoolSeries and I was wondering if that is presenting a problem for me in my understanding since I can't use the [0] to reference the current bar? Thanks in advance for the help in helping me understand.

    #2
    We will look into it. Thanks.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi higler !

      The problem in the Darvas indicator is fixed and the fix will be available with the next update.

      Thanks for reporting,
      Christian
      ChristianSenior Software Developer

      Comment


        #4
        Can you tell me if the problem is in the Ninja Script code? Should it return a BoolSeries instead of a bool or is there something else? This question is just for my own edification because I am trying to understand the programming difference between an indicator returning a bool vs a BoolSeries and how I can use the return values and the useage in historical data vs real time data. Thanks.

        Comment


          #5
          The problem is with the Darvas indicator and not with your code. We will provide a fixed version with next NT update available in a few weeks.

          Comment


            #6
            Great, I can see someone else already posted on this. Looking forward to the fix. Thanks!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by elirion, Today, 01:36 AM
            0 responses
            2 views
            0 likes
            Last Post elirion
            by elirion
             
            Started by gentlebenthebear, Today, 01:30 AM
            0 responses
            2 views
            0 likes
            Last Post gentlebenthebear  
            Started by samish18, Yesterday, 08:31 AM
            2 responses
            9 views
            0 likes
            Last Post elirion
            by elirion
             
            Started by Mestor, 03-10-2023, 01:50 AM
            16 responses
            389 views
            0 likes
            Last Post z.franck  
            Started by rtwave, 04-12-2024, 09:30 AM
            4 responses
            31 views
            0 likes
            Last Post rtwave
            by rtwave
             
            Working...
            X