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

modified Swing indicator

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

    modified Swing indicator

    I use the Swing indicator to show recent support/resistance points. I modified the NT swing indicator so that the user can chose between the high/low of the bar OR the bar close. (My thanks to the NT programmers for exposing their code; I only needed to add a dozen or so lines of code to the indicator).
    Attached Files

    #2
    bulldogcajun, thanks for sharing your modifications here with our community!
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Found error in bjeswing.cs

      Hi bulldogcajun, I found an error in your bjeSwing.cs.

      See attached file.
      Attached Files

      Comment


        #4
        Could you please post the new swing indicator bje fixed its very interesting the option that you added about open price and close price instead of high and low

        Thank you

        Comment


          #5
          I never heard back from the original author about the bug I found. All credit and thanks should go to him for his efforts.

          All I did was download his ZIP file, study it by comparing bjeswing.cs to original swing.cs, noticed an anomaly (aka, a bug), and fixed it.

          Fyi, by looking at my screenshot of the bug, you could have downloaded bjeswing.zip from author's first post and easily corrected the bug in bjeswing.cs yourself.

          Nevertheless, as requested, I've uploaded my fixed version.
          Attached Files

          Comment


            #6
            Thank you very much for your reply I would also like to Thank the author of this indicator this is almost exactly what I need I dont know if you can see this error from the original swing indicator the previous closing price is not the same at all Ive joined a screenshot if you can help me out
            Attached Files

            Comment


              #7
              Ah, good catch. Yes, that is a deeper bug.

              I've attached my own bltSwing.cs, which does not have this issue.

              I believe it's a simpler solution that correctly satisfies the original intent of the OP.
              Attached Files
              Last edited by bltdavid; 02-02-2015, 08:51 PM.

              Comment


                #8
                Amazing Thank you very much Do you think there is a way to add rays or ( - - - ) lines so I could use that as support / resistance you think ?

                Comment


                  #9
                  I don't recommend modifying the Swing indicator (or bltSwing) to do this.

                  I'm sure other dedicated solutions already exist.

                  Try searching downloads section of this forum or try https://www.bigmiketrading.com/.

                  If you find one you like, let me know and I'll see if I can modify it to use bltSwing.

                  Comment


                    #10
                    Thanks I have a request

                    Bltdavid your indicator is fantastic its very usefull for me Thank you very much

                    I have the code for one that is approximatly the same but I need it to be coded and it need to be plotable on the dataseries meaning that it can plot for long and short for programmation

                    Can you please help me I guess you would just need to modify the bltswing indicator and add the new code lines

                    I have the code but I have no knowledge in programmation on Ninjatrader I program via Blood hound you should check it out its fantastic

                    I can send you the code if you can provide me your email adress

                    Thank again
                    Last edited by izzyp45; 02-13-2015, 12:53 AM.

                    Comment


                      #11
                      Originally posted by izzyp45 View Post
                      Bltdavid your indicator is fantastic its very usefull for me Thank you very much

                      I have the code for one that is approximatly the same but I need it to be coded and it need to be plotable on the dataseries meaning that it can plot for long and short for programmation

                      Can you please help me I guess you would just need to modify the bltswing indicator and add the new code lines

                      I have the code but I have no knowledge in programmation on Ninjatrader I program via Blood hound you should check it out its fantastic

                      I can send you the code if you can provide me your email adress

                      Thank again
                      Thanks, glad you like it.

                      The idea is relative simple. In the indicator you have, everywhere it is using the High or Low DataSeries, we'd substitute eHigh and eLow instead. These our own "effective" Highs and Lows that normally contain exact same values as regular High/Low, the point is UseBarHiLo controls how we add values to eHigh/eLow.

                      The beauty is that we get to load values into eHigh/eLow ourselves, so if UseBarHiLo is true, this means we add normal HighLow values,

                      Code:
                      if (UseBarHiLo)
                      {
                          eHigh.Set(High[0]);
                          eLow.Set(Low[0]);
                      }
                      which seems kinda pointless, until we study the "else" code and here the ah-hah comes into play ...

                      Code:
                      else
                      {
                          eHigh.Set(Math.Max(Open[0], Close[0]));
                          eLow.Set(Math.Min(Open[0], Close[0]));
                      }
                      That's the jist of the fundamental idea: substitute eHigh/eLow everywhere High/Low are being used and now you can use that a cool property that acts like a switch (aka UseBarHiLo) that can be flipped on or off: it's used to control how eHigh/eLow is built.

                      If you'd still like to email me, send me a PM using the forum.

                      I'd be happy to take a look at it.

                      Comment


                        #12
                        Multiples strenght swing

                        hey bltdavid I hope your going fine I have a question regarding the bltswing that you have made.

                        I would like to know if its possible to add multiples strenght I know its seems a stupid question because I could just set it up 2 or 3 times on the chart with differents strenght

                        but Im trying to program a strategy with another system that needs only 1 indicator to refer to

                        Let meknow if it's possible to add multiple strenght settings in blt swing that way when it's enabled on the chart it will plot all the different strenght setup lets say one of (5) one of (13) and one of (25) and one of (100)

                        Im sure its a simple easy thing to do in the code but im requesting your help again

                        Thank you very much

                        Comment


                          #13
                          I'm sure it's possible, but I haven't the bandwidth to do that for you.

                          What is the other system you speak of? Is that Bloodhound?

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by ghoul, Today, 06:02 PM
                          3 responses
                          14 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by jeronymite, 04-12-2024, 04:26 PM
                          3 responses
                          44 views
                          0 likes
                          Last Post jeronymite  
                          Started by Barry Milan, Yesterday, 10:35 PM
                          7 responses
                          20 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by AttiM, 02-14-2024, 05:20 PM
                          10 responses
                          180 views
                          0 likes
                          Last Post jeronymite  
                          Started by DanielSanMartin, Yesterday, 02:37 PM
                          2 responses
                          13 views
                          0 likes
                          Last Post DanielSanMartin  
                          Working...
                          X