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 Breakout

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

    Darvas Breakout

    Hi,

    I'm trying to write a strat that enters when price breaks out of the Darvas (pre-installed indicator) channel. However, depending upon price movement, sometimes these lines redraw themselves at different prices upon bar close. When they don't, if(Close[0] > Darvis().Upper[0] ---> EnterLong() works fine. When they do, that snippet doesn't work because Darvas will redraw the line at Close[0]. Using Darvis().Upper[1] doesn't work either because the line usually redraws itself several bars back.

    Is there anyway to get around this? Maybe some snippet in the code that tells it to redraw? If so, maybe I can use that? I've poured over the code but can't figure it out.

    Thanks,
    Dave

    #2
    Dave,

    This is the nature of the Darvas indicator. It repaints itself which is why it looks so good. Unfortunately you cannot trade like how it looks. You can only trade it how it performs in real-time going forward and not how it looks going back.

    Repainting from the future is something that can be done by an indicator. Re-trading the past is something that cannot be done in real trading or in backtesting. You can't say on day 2/12 that you should enter day 2/10 at x-price. 2/10 is already over and you cannot trade it anymore once you are past 2/10.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hey Josh,

      Thanks for your reply. I understand what you're saying but since there obviously has to be something in the code that tells it to redraw (say at a higher price), I was thinking maybe I could use that as a bool and if it == true, that I could enter long from that?

      Comment


        #4
        dsraider,

        Unfortunately not. Whatever the Darvas is doing to decide when to repaint is done internally and there is no exposed property for accessing it to program against.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Hi Josh,

          I'm way too stubborn to give up but thanks for getting back to me.

          Dave

          Comment


            #6
            Hey Josh. I know this string was started a few years ago, but wondering if you were able to figure out the Darvas indicator in creating a trade strategy around it. I'm currently trying to figure out how to make the Darvas indicator less noisy. I'm currently trying to add the SR Lines to the darvas indicator. If you go to my post on the Darvas indicator, you will be able to see what I have so far.

            Comment


              #7
              Josh works with development these days and doesn't monitor the forum. If you don't mind keeping your project contained to a single thread, we'd be happy to look into that for you. We see your reply in the following thread and will be updating shortly:

              MatthewNinjaTrader Product Management

              Comment


                #8
                gretzkyless,

                If you are interested in a Darvas indicator that shows same data on live than historical ( or after a refresh ) try looking at the TIS_Darvas from The Indicator Store :
                pmaglio
                NinjaTrader Ecosystem Vendor - The Indicator Store

                Comment


                  #9
                  Originally posted by pmaglio View Post
                  gretzkyless,

                  If you are interested in a Darvas indicator that shows same data on live than historical ( or after a refresh ) try looking at the TIS_Darvas from The Indicator Store :
                  pmaglio - thanks for the link, but I'm looking for something more specific with the Darvas boxes. Working with a friend to see if he can help me write exactly what I'm looking for in this indicator. If what i want doesn't accomplish what I envision, will definitely re-visit the link you sent.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by haas88, 03-21-2024, 02:22 AM
                  19 responses
                  220 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by ZeroKuhl, Yesterday, 04:31 PM
                  4 responses
                  29 views
                  0 likes
                  Last Post ZeroKuhl  
                  Started by cupir2, Yesterday, 07:44 PM
                  3 responses
                  21 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by reynoldsn, Yesterday, 07:26 PM
                  2 responses
                  16 views
                  0 likes
                  Last Post reynoldsn  
                  Started by MartinT, 05-17-2023, 06:00 AM
                  18 responses
                  175 views
                  0 likes
                  Last Post flybuzz
                  by flybuzz
                   
                  Working...
                  X