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

Count Back Line ... for Guppy or Trend ???

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

    Count Back Line ... for Guppy or Trend ???

    Greetings All,

    Does anyone have a CBL CountbackLine Indicator programmed for Ninja, such as Daryl Guppy uses with his GMMA guppy Trend charts?

    Or .... can anyone code one or convert one for me from a Meta file? Any other such indicators to help wth Trend Entry signals, would be much appreciated.

    Thanks,,, Chris

    #2
    Hi Chris, unfortunately I'm not aware of this indicator for NinjaTrader, if you post some source code here I'm sure the community can take a look and maybe help you out converting this to NinjaScript.

    If you need this custom programmed in a professional manner, please contact those - http://www.ninjatrader.com/webnew/pa...injaScript.htm
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Here's the Code ... and then some?

      Originally posted by NinjaTrader_Bertrand View Post
      Hi Chris, unfortunately I'm not aware of this indicator for NinjaTrader, if you post some source code here I'm sure the community can take a look and maybe help you out converting this to NinjaScript.

      If you need this custom programmed in a professional manner, please contact those - http://www.ninjatrader.com/webnew/pa...injaScript.htm

      Thanks Bertrand! - Code is below, and little more Info in attached file. Hope someone is up for the challenge! Chris



      Formula:
      CBLhi:

      HighDays := Input("Enter # days to cover last HIGH for CBL calc'n:", 3, 55, 13);

      If(HIGH < HHV(HIGH, HighDays), {then ...} PREV, {previous CBLhi, else...} If(Ref(L,-2) < Ref(L,-1) AND Ref(L,-2) < L AND Ref(L,-1) < L, {then ...} Ref(L,-2), {2nd day back low, else...} If((Ref(L,-3)< Ref(L,-2) AND Ref(L,-3) < Ref(L,-1) AND Ref(L,-3) < L) AND (Ref(L,-2)< L OR Ref(L,-1) < L), {then ... } Ref(L,-3), {3rd day back low, else...} If((Ref(L,-4)< Ref(L,-3) AND Ref(L,-4) < Ref(L,-2) AND Ref(L,-4) < Ref(L,-1) AND Ref(L,-4) < L) AND (Ref(L,-3)< L OR Ref(L,-2) < L OR Ref(L,-1) < L), {then... } Ref(L,-4), {4th day back low, else...} If((Ref(L,-5)< Ref(L,-4) AND Ref(L,-5) < Ref(L,-3) AND Ref(L,-5) < Ref(L,-2) AND Ref(L,-5) < Ref(L,-1) AND Ref(L,-5) < L) AND (Ref(L,-4)< L OR Ref(L,-3) < L OR Ref(L,-2) < L OR Ref(L,-1) < L), {then ...} Ref(L,-5), {5th day back low, else...} PREV )))))

      and for the CBL from a LOW

      CBLlo:

      LowDays := Input("Enter # days to cover last LOW for CBL calc'n:", 3, 55, 13);

      If(LOW > LLV(LOW, LowDays), {then ...} PREV, {previous CBLlo, else...} If(Ref(H,-2) > Ref(H,-1) AND Ref(H,-2) > H AND Ref(H,-1) > H, {then ...} Ref(H,-2), {2nd day back high,else...} If((Ref(H,-3)> Ref(H,-2) AND Ref(H,-3) > Ref(H,-1) AND Ref(H,-3) > H) AND (Ref(H,-2)> H OR Ref(H,-1) > H), {then ... } Ref(H,-3), {3rd day back high,else...} If((Ref(H,-4)> Ref(H,-3) AND Ref(H,-4) > Ref(H,-2) AND Ref(H,-4) > Ref(H,-1) AND Ref(H,-4) > H) AND (Ref(H,-3)> H OR Ref(H,-2) > H OR Ref(H,-1) > H), {then... } Ref(H,-4), {4th day back high,else...} If((Ref(H,-5)> Ref(H,-4) AND Ref(H,-5) > Ref(H,-3) AND Ref(H,-5) > Ref(H,-2) AND Ref(H,-5) > Ref(H,-1) AND Ref(H,-5) > H) AND (Ref(H,-4)> H OR Ref(H,-3) > H OR Ref(H,-2) > H OR Ref(H,-1) > H), {then ...} Ref(H,-5), {5th day back high,else...} PREV )))))
      Attached Files

      Comment


        #4
        Thanks for posting this Chris, to comment on your doc, in NinjaScript you can combine the two into one study. If you want to give this a try yourself, we have some great NinjaScript tutorials to get you started - http://www.ninjatrader-support.com/H...verview18.html
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Thanks for posting this Chris, to comment on your doc, in NinjaScript you can combine the two into one study. If you want to give this a try yourself, we have some great NinjaScript tutorials to get you started - http://www.ninjatrader-support.com/H...verview18.html
          Thanks for the Link! I will try .. but am hoping someone will come to the rescue! Chris

          Comment


            #6
            Chris,

            I'm trying to find the same thing with no luck. Did you happen to get rescued or end up writing it yourself?

            Anyone else out there able to point me in the right direction? Thanks.

            Swimmy

            Comment


              #7
              Hi Swimmy. Ooops! I had quite forgotten, but am still interested. And Nope, neither, to answer you question. <gr>

              Maybe somebody would now give it a try using all the power of Ninja 7. I'm just not any good a programming - but love things Guppy. A CountbackLine Indicator would be Fantastic. Anybody care to try ... Please! )

              Chris

              Comment


                #8
                Thanks for the note. If I manage to find / create something useful I'll put it up here.

                Comment


                  #9
                  I'd love to put the CBL into a strategy.

                  Matt

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Stanfillirenfro, Yesterday, 09:19 AM
                  7 responses
                  51 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by TraderCro, 04-12-2024, 11:36 AM
                  4 responses
                  69 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Mindset, Yesterday, 02:04 AM
                  1 response
                  15 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by agclub, 04-21-2024, 08:57 PM
                  4 responses
                  18 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by Irukandji, Today, 04:58 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post Irukandji  
                  Working...
                  X