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

Projected Line for Bollinger Bands for the current and prior sessions

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

    #16
    I`m going to share what has been done with the assistance of Michael by now.Thanks,Michael,appreciated!

    So far an audible and e-mail alert been added to the code.

    So,if anybody more experienced would love to expand on the indicator - it may include,ability to access the session count in the indicator properties,line width and colors via properties,text font,other major and minor stuff to improve it,PLEASE FEEL FREE to chime in!

    Thanks to all!
    Attached Files

    Comment


      #17
      Originally posted by outsource View Post
      I`m going to share what has been done with the assistance of Michael by now.Thanks,Michael,appreciated!

      So far an audible and e-mail alert been added to the code.

      So,if anybody more experienced would love to expand on the indicator - it may include,ability to access the session count in the indicator properties,line width and colors via properties,text font,other major and minor stuff to improve it,PLEASE FEEL FREE to chime in!

      Thanks to all!
      Hey, Guys,

      Could anyone please suggest how to add line width and colors to the properties?

      Comment


        #18
        Hello outsource,

        A good example of creating user definable inputs in NinjaTrader 7 is covered in a forum post here: http://www.ninjatrader.com/support/f...ead.php?t=4977

        Please let us know if you have any questions.
        Michael M.NinjaTrader Quality Assurance

        Comment


          #19
          Originally posted by NinjaTrader_MichaelM View Post
          Hello outsource,

          A good example of creating user definable inputs in NinjaTrader 7 is covered in a forum post here: http://www.ninjatrader.com/support/f...ead.php?t=4977

          Please let us know if you have any questions.
          Thanks Michael,

          nah...i`m not sophisticated enough to connect the dots!always get errors,here and there.

          Comment


            #20
            Hi outsource,

            The NinjaTrader Ecosystem partners with a number of programming consultants that offer custom coding for the NinjaTrader environment.
            Below is a link to these Certified NinjaScript Consultants. You may hover your mouse over each one for a short description.
            http://ninjatraderecosystem.com/Part...ultants.php#81
            Once you have reviewed these consultants, should you have any questions or desire an introduction please let me know and I will be happy to assist.
            JaredNinjaTrader Ecosystem

            Comment


              #21
              Originally posted by NinjaTraderEcosystem_Jared View Post
              Hi outsource,

              The NinjaTrader Ecosystem partners with a number of programming consultants that offer custom coding for the NinjaTrader environment.
              Below is a link to these Certified NinjaScript Consultants. You may hover your mouse over each one for a short description.
              http://ninjatraderecosystem.com/Part...ultants.php#81
              Once you have reviewed these consultants, should you have any questions or desire an introduction please let me know and I will be happy to assist.

              Thanks Jared,

              i`m familiar with many of them,and have a mixed feelings about their integrity and how they operate.They usually code the stuff you ask,but then,if there`s something additional popping up,that beyond the initial agreement,they usually blow you off.

              Comment


                #22
                Originally posted by outsource View Post
                Thanks Jared,

                i`m familiar with many of them,and have a mixed feelings about their integrity and how they operate.They usually code the stuff you ask,but then,if there`s something additional popping up,that beyond the initial agreement,they usually blow you off.
                Just curious, but what are you really expecting? Are you saying that once you sign an agreement, they should code anything else you want to add beyond the original agreement, for you, for free, forever?

                Comment


                  #23
                  Originally posted by koganam View Post
                  Just curious, but what are you really expecting? Are you saying that once you sign an agreement, they should code anything else you want to add beyond the original agreement, for you, for free, forever?
                  Well,if your curious,sigh....

                  No,not quite.Imagine when everything is signed and you recierve a buggy product,which you were only able to figure out months later.You then address the issue to the developer,but on the other end they assured you everything`s fine.You then use 3-rd party to verify,and the 3-rd party confirmed that there really bugs in there.You then address the issue again,and now they agreed with the bugs and you ask for refund and recieve smth like"you used it long enough to ask for refund''.Then you suggest the vendor to add some extra stuff in return to settle the issue,they stop replying to you email.

                  It`s just a small example on how that fine gentlemen operate.There are many many more.Not that i say everyone of them like that,but 90 % i dealt with like that.They very slow to reply when the money recieved and the product is delivered(most of the time postponed,not in time,btw),but very freaking fast to push paypal invoices button!

                  So,my experience is mostly negative.

                  Did i satisfy your curiosity?

                  Comment


                    #24
                    Originally posted by outsource View Post
                    Well,if your curious,sigh....

                    No,not quite.Imagine when everything is signed and you recierve a buggy product,which you were only able to figure out months later.You then address the issue to the developer,but on the other end they assured you everything`s fine.You then use 3-rd party to verify,and the 3-rd party confirmed that there really bugs in there.You then address the issue again,and now they agreed with the bugs and you ask for refund and recieve smth like"you used it long enough to ask for refund''.Then you suggest the vendor to add some extra stuff in return to settle the issue,they stop replying to you email.

                    It`s just a small example on how that fine gentlemen operate.There are many many more.Not that i say everyone of them like that,but 90 % i dealt with like that.They very slow to reply when the money recieved and the product is delivered(most of the time postponed,not in time,btw),but very freaking fast to push paypal invoices button!

                    So,my experience is mostly negative.

                    Did i satisfy your curiosity?
                    Well, that is a very bad experience, once you give all the details. Especially if they acknowledged that the code that they provided to you was buggy. However, code is only buggy if it does not meet the original specification, and I am certainly not in a position to know what was originally specified.

                    But what you wrote now is very different from your original statement: "They usually code the stuff you ask,but then,if there`s something additional popping up,that beyond the initial agreement,they usually blow you off." (emphasis mine). That statement implies that the code was complete and functional, not buggy, and that the request was for new additional stuff after the completed, verified code.

                    Thanks for the response. You have satisfied my curiosity.
                    Last edited by koganam; 06-13-2015, 05:35 AM.

                    Comment


                      #25
                      Hi Michael,

                      can you please suggest why the platform crashes when i try to repeat the same trick with the gaussian filter(attached)?
                      Attached Files

                      Comment


                        #26
                        Hello outsource,

                        You are creating an infinite loop by accessing the indicator within itself. You need to call the anaGaussianFilter from another indicator for the code we created to work properly.

                        For example, please make sure the anaGaussianFilter indicator in your NinjaTrader does not contain any of the BollingerBandLines code we just created. Then open the BollingerBandLines indicator and change the following code:

                        Code:
                        bollingerSession[1] = Bollinger(numStdDev, period).Values[0][0];
                        bollingerSession[2] = Bollinger(numStdDev, period).Values[2][0];
                        to

                        Code:
                        bollingerSession[1] = anaGaussianFilter(period, poles).Values[0][0];
                        Then make sure to remove any other references to bollingerSession[2] in the BollingerBandLines code and adjust the variables accordingly (such as removing numStdDev and adding poles).

                        Also please make sure to use [GridCategory("Parameters")] instead of [Category("Parameters")] when declaring parameters for an indicator.

                        After recompiling the BollingerBandLines indicator you can add it to a chart so it will then plot the anaGaussianFilter line instead of the Bollinger band lines.

                        If you wish to have the anaGaussianFilter indicator visible at the same time you can absolutely add it to the chart as well.

                        Please let us know if we may be of further assistance.
                        Michael M.NinjaTrader Quality Assurance

                        Comment


                          #27
                          Originally posted by NinjaTrader_MichaelM View Post
                          Hello outsource,

                          You are creating an infinite loop by accessing the indicator within itself. You need to call the anaGaussianFilter from another indicator for the code we created to work properly.

                          For example, please make sure the anaGaussianFilter indicator in your NinjaTrader does not contain any of the BollingerBandLines code we just created. Then open the BollingerBandLines indicator and change the following code:

                          Code:
                          bollingerSession[1] = Bollinger(numStdDev, period).Values[0][0];
                          bollingerSession[2] = Bollinger(numStdDev, period).Values[2][0];
                          to

                          Code:
                          bollingerSession[1] = anaGaussianFilter(period, poles).Values[0][0];
                          Then make sure to remove any other references to bollingerSession[2] in the BollingerBandLines code and adjust the variables accordingly (such as removing numStdDev and adding poles).

                          Also please make sure to use [GridCategory("Parameters")] instead of [Category("Parameters")] when declaring parameters for an indicator.

                          After recompiling the BollingerBandLines indicator you can add it to a chart so it will then plot the anaGaussianFilter line instead of the Bollinger band lines.

                          If you wish to have the anaGaussianFilter indicator visible at the same time you can absolutely add it to the chart as well.

                          Please let us know if we may be of further assistance.
                          thats great,Michael!

                          Thanks for your time and assistance!

                          Comment


                            #28
                            Hi Michael,

                            one FINAL thing if i could ask you to assist with,please.I`d need to access the lines properties somehow - width,style.I need several instancies of the BBLines on the chart,so i need to be able to discern which is which,by changing the lines width, colors,etc to know i know,so to say.

                            Thanks a lot.

                            Comment


                              #29
                              Hello outsource,

                              You can accomplish changing the line color and width by adding them as properties in the BBLines indicator code.

                              Please see our forums post on how to create user-definable inputs in your script: http://www.ninjatrader.com/support/f...ead.php?t=5782

                              *The line width would be an int input

                              Please see our forum post on how to create user-definable colors in your script: http://www.ninjatrader.com/support/f...ead.php?t=4977

                              *The line color would be a Color input

                              Then where the lines are drawn in the code you would adjust it to use the new variable names instead. For example:

                              Code:
                              DrawLine("Session" + bollingerSessionList.Count.ToString() + "BollingerUpper", CurrentBar - (int)bollingerSessionList[bollingerSessionList.Count - 1][0], bollingerSessionList[bollingerSessionList.Count - 1][1], 0, bollingerSessionList[bollingerSessionList.Count - 1][1], [COLOR="red"]Color.Red[/COLOR]); 
                              				
                              DrawRay("LastSessionBollingerUpper", 1, bollingerSessionList[bollingerSessionList.Count - 1][1], 0, bollingerSessionList[bollingerSessionList.Count - 1][1], [COLOR="red"]Color.Red[/COLOR]);
                              would become something like:

                              Code:
                              DrawLine("Session" + bollingerSessionList.Count.ToString() + "BollingerUpper", false, CurrentBar - (int)bollingerSessionList[bollingerSessionList.Count - 1][0], bollingerSessionList[bollingerSessionList.Count - 1][1], 0, bollingerSessionList[bollingerSessionList.Count - 1][1], [COLOR="Red"]userColor, DashStyle.Solid, userWidth[/COLOR]); 
                              				
                              DrawRay("LastSessionBollingerUpper", false, 1, bollingerSessionList[bollingerSessionList.Count - 1][1], 0, bollingerSessionList[bollingerSessionList.Count - 1][1], [COLOR="red"]userColor, DashStyle.Solid, userWidth[/COLOR]);
                              where you had created userColor and userWidth properties using the examples above.

                              Please let us know if we may be of further assistance.
                              Last edited by NinjaTrader_MichaelM; 06-17-2015, 06:04 AM.
                              Michael M.NinjaTrader Quality Assurance

                              Comment


                                #30
                                Originally posted by NinjaTrader_MichaelM View Post
                                Hello outsource,

                                You can accomplish changing the line color and width by adding them as properties in the BBLines indicator code.

                                Please see our forums post on how to create user-definable inputs in your script: http://www.ninjatrader.com/support/f...ead.php?t=5782

                                *The line width would be an int input

                                Please see our forum post on how to create user-definable colors in your script: http://www.ninjatrader.com/support/f...ead.php?t=4977

                                *The line color would be a Color input

                                Then where the lines are drawn in the code you would adjust it to use the new variable names instead. For example:

                                Code:
                                DrawLine("Session" + bollingerSessionList.Count.ToString() + "BollingerUpper", CurrentBar - (int)bollingerSessionList[bollingerSessionList.Count - 1][0], bollingerSessionList[bollingerSessionList.Count - 1][1], 0, bollingerSessionList[bollingerSessionList.Count - 1][1], [COLOR="red"]Color.Red[/COLOR]); 
                                				
                                DrawRay("LastSessionBollingerUpper", 1, bollingerSessionList[bollingerSessionList.Count - 1][1], 0, bollingerSessionList[bollingerSessionList.Count - 1][1], [COLOR="red"]Color.Red[/COLOR]);
                                would become something like:

                                Code:
                                DrawLine("Session" + bollingerSessionList.Count.ToString() + "BollingerUpper", CurrentBar - (int)bollingerSessionList[bollingerSessionList.Count - 1][0], bollingerSessionList[bollingerSessionList.Count - 1][1], 0, bollingerSessionList[bollingerSessionList.Count - 1][1], [COLOR="Red"]userColor, DashStyle.Solid, userWidth[/COLOR]); 
                                				
                                DrawRay("LastSessionBollingerUpper", 1, bollingerSessionList[bollingerSessionList.Count - 1][1], 0, bollingerSessionList[bollingerSessionList.Count - 1][1], [COLOR="red"]userColor, DashStyle.Solid, userWidth[/COLOR]);
                                where you had created userColor and userWidth properties using the examples above.

                                Please let us know if we may be of further assistance.
                                Hi Michael,

                                i did exactly as you`ve suggested but get errors:

                                No overload for method 'DrawLine' takes '8' arguments
                                No overload for method 'DrawRay' takes '8' arguments


                                How do i correct them,and,one more thing,how do i add an input for the LineStyle,as well?

                                Thank you

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by geddyisodin, Today, 05:20 AM
                                1 response
                                11 views
                                0 likes
                                Last Post NinjaTrader_Gaby  
                                Started by Max238, Today, 01:28 AM
                                3 responses
                                32 views
                                0 likes
                                Last Post Max238
                                by Max238
                                 
                                Started by timko, Today, 06:45 AM
                                2 responses
                                13 views
                                0 likes
                                Last Post NinjaTrader_ChristopherJ  
                                Started by habeebft, Today, 07:27 AM
                                0 responses
                                5 views
                                0 likes
                                Last Post habeebft  
                                Started by Tim-c, Today, 03:54 AM
                                1 response
                                8 views
                                0 likes
                                Last Post NinjaTrader_BrandonH  
                                Working...
                                X