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

Looking for some guidance

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

    Looking for some guidance

    Hi, I am wanting to code an indicator to plot the "Guppy count back line". As I have not been able to find one already coded for NT8 anywhere.
    I have programmed several indicators now, and have some idea what I am doing. But I am at a bit of a loss to know how to tackle some parts of this one.

    I will give a bit of an example of how the count back line works. Say the market is in a down trend. The count back starts at the most recent low, then the next bar back that we are looking for is the prior one with a higher high, and then the bar before that one that we want is the next one back with a higher high. Then there is to be a ray drawn off the high of that third highest high bar back, to the right of the chart. Or plot a square line?

    Ok, what I need help with is how to put that into ninjascript. I don't know how I would reference the bars that I mentioned. I need to tackle this first then I have to work out how to do the plot or rays.
    If there is already an indicator for this I'd love to have it. Otherwise any help you can offer will be appreciated. Even a similar indicator that I could look at the code and learn from that what to do?

    Cheers,
    Ken.


    #2
    I used Darvas box code to code CBL for NT7
    Attached Files
    Last edited by nkhoi; 03-19-2019, 10:16 PM.

    Comment


      #3
      Originally posted by nkhoi View Post
      I used Darvas box code to code CBL for NT7
      Hi and thanks for that, I'll have a look at it.

      Comment


        #4
        Hello KennyK,

        Thanks for your post.

        Please let me know if you have any questions on converting the script that nkhoi posted. It looks like it will convert easily. They only code change I can see is the drawing objects syntax. Here are the NT8 links for all of those draw objects:

        Draw.TriangleDown()
        Draw.Ray()
        Draw.TriangleUp()


        The code breaking changes page is always useful for converting as well.

        Please let me know if I can assist further.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hi Chris, Thanks for that. I have done as you explained within visual studio. I then saved the modified file as a .CS file, zipped it then tried to import it into NT8. I got a message saying it was made by an earlier version of NT and is incompatible. I can't see what else might need to be done. I have attached it here, can you please look at it and advise, thanks.
          Attached Files

          Comment


            #6
            Hello KennyK,

            Thank you for your reply.

            There is quite a bit of different NinjaScript architecture between NinjaTrader 7 and 8. NinjaTrader 8 is fully event-driven, so I would first recommend to convert a script, start by making a new indicator or strategy, then copy over the logic. I did the same thing with the new script you posted. The OnBarUpdate mostly copied over, for the most part. The only differences is that drawing tools in NinjaTrader 7 used the Windows Color class and NT8 uses WPF Brushes.

            Please also see this page on the NT8 event lifecycle:


            Please let me know if you have any questions.
            Attached Files
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Got it all working now, thanks very much for your help!
              It's attached here if anyone wants it.
              Attached Files

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by gemify, 11-11-2022, 11:52 AM
              6 responses
              803 views
              2 likes
              Last Post ultls
              by ultls
               
              Started by ScottWalsh, Today, 04:52 PM
              0 responses
              3 views
              0 likes
              Last Post ScottWalsh  
              Started by ScottWalsh, Today, 04:29 PM
              0 responses
              7 views
              0 likes
              Last Post ScottWalsh  
              Started by rtwave, 04-12-2024, 09:30 AM
              2 responses
              22 views
              0 likes
              Last Post rtwave
              by rtwave
               
              Started by tsantospinto, 04-12-2024, 07:04 PM
              5 responses
              70 views
              0 likes
              Last Post tsantospinto  
              Working...
              X