Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BB (TTM) Squeeze and PBF Squeeze replica ported to NT

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

    #61
    Thanks, guys. Mensat, that link did it. Unfortunately, though, it doesn't seem to want to be coded as per normal. Any tips for getting a strat to recognize momentum and squeeze on/off?

    Comment


      #62
      Originally posted by dsraider View Post
      Thanks, guys. Mensat, that link did it. Unfortunately, though, it doesn't seem to want to be coded as per normal. Any tips for getting a strat to recognize momentum and squeeze on/off?
      This indicator has lot of dataseries ( see on graph with RSqueeze and open data box) and must be coded separately:

      example :

      ...... Down trend ....
      && RSqueeze(SqueezeStyle.PBFSqueeze).NMomentumDown[0] < 0 // right value
      && RSqueeze(SqueezeStyle.PBFSqueeze).NMomentumDown[0] != Close[0] // any data serie set to Close[0] if this data serie has not right value

      && RSqueeze(SqueezeStyle.PBFSqueeze).SqueezeOn == 0

      .... UP trend ...
      && RSqueeze(SqueezeStyle.PBFSqueeze).PMomentumUp[0] > 0
      && RSqueeze(SqueezeStyle.PBFSqueeze).PMomentumUp[0] != Close[0]

      Comment


        #63
        mensat, I really appreciate your help but I'm getting the following:

        && RSqueeze(SqueezeStyle.BBSqueeze).PMomentumUp[1] > 0
        'SqueezeStyle' is an ambiguous reference between 'TradingStudies.NinjaScript.Utility.SqueezeStyle' and 'RSqueeze.Utility.SqueezeStyle' CS0104 - click for info
        The best overloaded method match for 'NinjaTrader.Strategy.Strategy.RSqueeze(RSqueeze.U tility.SqueezeStyle)' has some invalid arguments CS1502 - click for info
        Argument '1': cannot convert from 'TradingStudies.NinjaScript.Utility.SqueezeStyle' to 'RSqueeze.Utility.SqueezeStyle' CS1503 - click for info

        What I did?
        Last edited by dsraider; 03-12-2010, 12:00 PM.

        Comment


          #64
          Originally posted by dsraider View Post
          mensat, I really appreciate your help but I'm getting the following:

          && RSqueeze(SqueezeStyle.BBSqueeze).PMomentumUp[1] > 0
          'SqueezeStyle' is an ambiguous reference between 'TradingStudies.NinjaScript.Utility.SqueezeStyle' and 'RSqueeze.Utility.SqueezeStyle' CS0104 - click for info
          The best overloaded method match for 'NinjaTrader.Strategy.Strategy.RSqueeze(RSqueeze.U tility.SqueezeStyle)' has some invalid arguments CS1502 - click for info
          Argument '1': cannot convert from 'TradingStudies.NinjaScript.Utility.SqueezeStyle' to 'RSqueeze.Utility.SqueezeStyle' CS1503 - click for info

          What I did?

          I don't know.
          Try reinstall indicator !?

          In section Initialize insert line Add(RSqueeze(SqueezeStyle.PBFSqueeze));
          and uncomment other lines with indicator and try compile and see if in strategy chart is RSqueeze indicator.

          Comment


            #65
            Originally posted by mensat View Post
            In section Initialize insert line Add(RSqueeze(SqueezeStyle.PBFSqueeze));
            and uncomment other lines with indicator and try compile and see if in strategy chart is RSqueeze indicator.
            You're a good man for trying to help, sir, but that actually made it worse I know some custom indicators just don't like being coded as is. I must be missing a step somewhere.

            Thanks,
            Dave

            Comment


              #66
              mensat,

              You were absolutely right. Another declaration was causing a conflict. After deleting that (and making a few slight changes), the Squeeze now works. Thanks very much for your help.

              Dave

              Comment


                #67
                Originally posted by dsraider View Post
                mensat,

                You were absolutely right. Another declaration was causing a conflict. After deleting that (and making a few slight changes), the Squeeze now works. Thanks very much for your help.

                Dave
                dsraider, could you share with us what other declaration was causing a conflict, and what else you may have done along the lines of modifications to the RSqueeze indicator so that it works within a strategy? Thanks much in advance!

                Gary

                Comment


                  #68
                  Hey hawks,

                  Poor choice of words on my part. The other changes I made had to do with unrelated code. Were you not able to compile using what's posted?

                  Comment


                    #69
                    Originally posted by dsraider View Post
                    Hey hawks,

                    Poor choice of words on my part. The other changes I made had to do with unrelated code. Were you not able to compile using what's posted?
                    Well, yes and no. I've added using RSqueeze.Utility; to the
                    #region Using declarations section as suggested earlier, and I added Add(RSqueeze(SqueezeStyle.PBFSqueeze)); to the
                    Initialize() section. Just doing this results in a successful compile.

                    Thing is, I like instantiating my indicators thusly:

                    CCI myCCI = CCI(BarsArray[0], 45, 200, -200);

                    so that later I can just do this:

                    if (myCCI.CCI[0] > x) {do something here}

                    So my problem here is with instantiating the RSqueeze indicator. I don't have any idea what the variables are (equivalent to the CCI's 45, -200 and 200) that need to be added to this:

                    RSqueeze myRSQ = RSqueeze(BarsArray[0], RSqueeze(SqueezeStyle.PBFSqueeze) );

                    If I try to compile with that line in there, I get these error messages, none of which point me towards anything that really helps:

                    Strategy\Strat768.cs 'RSqueeze' is a 'namespace' but is used like a 'type' CS0118 - click for info

                    Strategy\Strat768.cs The best overloaded method match for 'NinjaTrader.Strategy.Strategy.RSqueeze(NinjaTrade r.Data.IDataSeries, RSqueeze.Utility.SqueezeStyle)' has some invalid arguments CS1502 - click for info

                    Strategy\Strat768.cs Argument '2': cannot convert from 'NinjaTrader.Indicator.RSqueeze' to 'RSqueeze.Utility.SqueezeStyle' CS1503 - click for info


                    Any suggestions? If you could paste a snippet of your strategy code showing how you use the RSqueeze in some sort of a conditional statement, I'd be most grateful...

                    Comment


                      #70
                      Unfortunately, most of what you just said is over my head. However, this is what I have:

                      Code:
                      && RSqueeze(SqueezeStyle.BBSqueeze).PMomentumDown[2] > 0
                      && RSqueeze(SqueezeStyle.BBSqueeze).PMomentumDown[2] != Close[2]
                      && RSqueeze(SqueezeStyle.BBSqueeze).PMomentumUp[1] > 0
                      && RSqueeze(SqueezeStyle.BBSqueeze).PMomentumUp[1] != Close[1]
                      && RSqueeze(SqueezeStyle.BBSqueeze).SqueezeOn[2] == 0
                      && RSqueeze(SqueezeStyle.BBSqueeze).SqueezeOn[1] == 0
                      I added the RSqueeze Utility to declarations just like you did but did NOT anything to the initialize section. Everything works fine here. Let me know if this helps.

                      Dave

                      Comment


                        #71
                        Rock solid, Dave. I'll give it a try. Thanks for your help.

                        Comment


                          #72
                          Originally posted by dsraider View Post
                          Unfortunately, most of what you just said is over my head. However, this is what I have:

                          Code:
                          && RSqueeze(SqueezeStyle.BBSqueeze).PMomentumDown[2] > 0
                          && RSqueeze(SqueezeStyle.BBSqueeze).PMomentumDown[2] != Close[2]
                          && RSqueeze(SqueezeStyle.BBSqueeze).PMomentumUp[1] > 0
                          && RSqueeze(SqueezeStyle.BBSqueeze).PMomentumUp[1] != Close[1]
                          && RSqueeze(SqueezeStyle.BBSqueeze).SqueezeOn[2] == 0
                          && RSqueeze(SqueezeStyle.BBSqueeze).SqueezeOn[1] == 0
                          I added the RSqueeze Utility to declarations just like you did but did NOT anything to the initialize section. Everything works fine here. Let me know if this helps.

                          Dave

                          Dave, can you please postup your .cs to allow us less code astute to use the indicator in our own strategies as well?

                          Thanks,
                          Jon

                          Comment


                            #73
                            Trader.Jon,

                            Unfortunately, I have some proprietary stuff in that particular strat, so I can't just post the .cs. The best that I can offer is a point in the right direction. Can you give what I posted a try and let me know what happens?

                            Dave

                            Comment


                              #74
                              N7 ttm squezze

                              Would someone be kind enough to post the n7 zip
                              for ttm squezze to run on n7

                              thanks

                              steve

                              Comment


                                #75
                                See Roonius site:

                                see:


                                Must register.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by fx.practic, 10-15-2013, 12:53 AM
                                5 responses
                                5,403 views
                                0 likes
                                Last Post Bidder
                                by Bidder
                                 
                                Started by Shai Samuel, 07-02-2022, 02:46 PM
                                4 responses
                                94 views
                                0 likes
                                Last Post Bidder
                                by Bidder
                                 
                                Started by DJ888, Yesterday, 10:57 PM
                                0 responses
                                6 views
                                0 likes
                                Last Post DJ888
                                by DJ888
                                 
                                Started by MacDad, 02-25-2024, 11:48 PM
                                7 responses
                                158 views
                                0 likes
                                Last Post loganjarosz123  
                                Started by Belfortbucks, Yesterday, 09:29 PM
                                0 responses
                                8 views
                                0 likes
                                Last Post Belfortbucks  
                                Working...
                                X