• 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

Adding To Stochastics

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

    Adding To Stochastics

    Need some real basic help here. I want to add up/down arrows to existing Generic Stochastic Indicator. I am a newbie to programming, I do have the code but just looking for step by step instructions to add the arrows once the Stochastic cross either up or down. Little embarrassed asking. Thanks.

    #2
    Hello Labs905,

    Thank you for your note.

    There is no such thing as an embarrassing question. Feel free to ask whatever you need assistance or clarification on.

    To answer your inquiry, you can use the CrossAbove and CrossBelow conditions to check when these two cross.

    Sample -
    Code:
    			if(CrossAbove(K, D, 1))
    				DrawArrowUp("UpArrow" + CurrentBar, 0, K[0], Color.Blue);
    			if(CrossBelow(K, D, 1))
    				DrawArrowDown("DownArrow" + CurrentBar, 0, D[0], Color.Red);
    I have attached a sample script as well for this
    Attached Files
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thank you so much for the quick reply. Awesome. Again, brutal question, now how do I now install this into my Ninja Platform? (see, newbie). Again my apologies for such trivial questions. I promise you this, once I start getting the hang of this, I will not be such a bother. Thanks so much for you help and understanding.

      Comment


        #4
        Another total newbie here. How do I open/implement the attached .cs file? Thanks.

        Comment


          #5
          George Farmer: Easiest thing you can do is just to right click the file -> open as -> Notepad.

          Labs905: Open NinjaTrader -> Tools -> New NinjaScript -> Indicator... -> Next -> *Give it a name* -> Generate -> *Remove all the contents in the newly generated indicator* -> *Copy all the contents from the .cs file and paste them into the generated indicator* -> Right Click -> Compile.

          Now all you have to do is open a new chart and select the indicator named "NewStochastics".

          Hope that helped.

          - Alex

          Comment


            #6
            Many thanks Alex, will give it a go appreciated. FYI, it was left click.
            Last edited by Farmer George; 03-08-2015, 08:13 AM.

            Comment


              #7
              No problem, that is the way I personally find it easiest anyways.
              Here is another way to do it by manually importing the .cs file (2nd post): http://www.ninjatrader.com/support/f...t=49880&page=2

              Good luck with your project!

              Comment


                #8
                Ok, thanks again.

                Comment


                  #9
                  Incidentally Alex, how do I permanently remove/delete indicators? Thanks

                  Comment


                    #10
                    Alex, thanks so much for your help in this matter. Was of great help. Thank you.

                    Comment


                      #11
                      Now it does not show up in the indicators list. Must have messed-up somewhere.

                      Comment


                        #12
                        Sorry to bother once again. I clicked on the .cs file to download, my Microsoft Visual Studio 2005 Tools for Application window popped up, with nothing in it. I tried to download the link, and copy and paste, so far no luck. I know I am doing something wrong. any idea? thanks in advance.

                        Comment


                          #13
                          I'm happy I could help, Labs905!

                          Farmer George: As for deleting indicators go to (from the Control Center) Tools -> Edit NinjaScript -> Indicators... -> *select an indicator and click delete*. You can only do this with the indicators you have made, not the default ones.

                          Which indicator list does not show your indicator? When you had copied the NinjaScript, did you remember to compile it?
                          You go to: Tools -> Edit NinjaScript -> Indicators... -> *select the indicator and open* -> right click and compile inside the editor (or just click F5 inside the editor, it's the same thing).

                          If you don't compile the script it wont show up anywhere.

                          Comment


                            #14
                            Labs905: Are you not able to download the .cs file at all?

                            Comment


                              #15
                              Sadly no, I have tried multiple ways. I down load but nothing.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by racehit, Today, 12:50 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post racehit
                              by racehit
                               
                              Started by cmarkb, Today, 12:04 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post cmarkb
                              by cmarkb
                               
                              Started by supernova0219, Yesterday, 07:48 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post supernova0219  
                              Started by qwfxny, Yesterday, 07:20 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post qwfxny
                              by qwfxny
                               
                              Started by bouncetherubble, Yesterday, 04:48 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post bouncetherubble  
                              Working...
                              X