Announcement

Collapse
No announcement yet.

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 cmoran13, 04-16-2026, 01:02 PM
            0 responses
            42 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            25 views
            0 likes
            Last Post PaulMohn  
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            162 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            98 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            157 views
            2 likes
            Last Post CaptainJack  
            Working...
            X