• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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:
            https://ninjatrader.com/support/help...fecycle_of.htm

            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 Debayan Sen, Today, 01:50 AM
              0 responses
              1 view
              0 likes
              Last Post Debayan Sen  
              Started by eleven, Yesterday, 10:03 PM
              1 response
              9 views
              0 likes
              Last Post eleven
              by eleven
               
              Started by tvbecv, Yesterday, 09:23 PM
              0 responses
              8 views
              0 likes
              Last Post tvbecv
              by tvbecv
               
              Started by reedstickets, Yesterday, 08:07 PM
              0 responses
              8 views
              0 likes
              Last Post reedstickets  
              Started by timko, Yesterday, 07:39 PM
              0 responses
              5 views
              0 likes
              Last Post timko
              by timko
               
              Working...
              X