Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a ninjascript tutorial for newbies?

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

    Is there a ninjascript tutorial for newbies?

    Hi folks,
    I am new to automated trading in Ninja trader. Is there a ninjascript tutorial? I am a professional software developer and I write a lot of C# and C++ code everyday. So hopefully I can ramp up with ninjascript reasonably fast.

    #2
    zehua,

    Thanks for your interest.

    Our help guide : http://www.ninjatrader.com/support/h...nt7/index.html has some educational resources, and we also have reference samples in our support forum at the following link.

    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Old guy, no experience

      zehua,

      How did you find the NT tutorials? With your experience I'm curious to know if they helped.
      I'm an old guy with no programming experience, but I can read English. And the grammatical errors in the explanations make an already difficult project even harder. It drives me nuts! Have these ever been updated?
      I'm very analytical and detailed. There has got to be a way to make NTScript click. It feels like I'm close but can't make the connection between the code and what it's going to do. Are they leaving something out on purpose?
      Following the indicator/strategy tutorials if fine, but there seems to be a step missing, or an explanation missing, that would make it clearer what the code will do. Is this because NT wants us to give up and hire them to make our custom indicators/strategies?
      I'm going to keep trying but very frustrating! Somewhere between and !

      A reply would be great! Thanks.

      Comment


        #4
        Hi NothingNew,

        Thank you for the post.

        We have created Premium Paid Educational events where you will join a NinjaScript expert for a pair of 6-8 hour long intensive courses designed to provide you with an in depth look at programming indicators and automated strategies through the use of NinjaScript:

        http://www.ninjatrader.com/PremiumEducation.php

        We also have YouTube Videos available for Automated Strategy Development and NinjaScript.

        http://www.youtube.com/watch?v=SpwGT...D7105&index=13

        http://www.youtube.com/watch?v=JZpo0...140D7&index=14

        Let me know if I can be of further assistance.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NothingNew View Post
          zehua,

          How did you find the NT tutorials? With your experience I'm curious to know if they helped.
          I'm an old guy with no programming experience, but I can read English. And the grammatical errors in the explanations make an already difficult project even harder. It drives me nuts! Have these ever been updated?
          I'm very analytical and detailed. There has got to be a way to make NTScript click. It feels like I'm close but can't make the connection between the code and what it's going to do. Are they leaving something out on purpose?
          Following the indicator/strategy tutorials if fine, but there seems to be a step missing, or an explanation missing, that would make it clearer what the code will do. Is this because NT wants us to give up and hire them to make our custom indicators/strategies?
          I'm going to keep trying but very frustrating! Somewhere between and !

          A reply would be great! Thanks.
          I know I am 2 years behind on this post but did you find the solution you were looking for?

          Best regards,

          Dolfan

          Comment


            #6
            Hello Dolfan,

            Thanks for your post.

            If you would like to take on learning NinjaScript, we have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.
            A link to our Help Guide can be found below: http://www.ninjatrader.com/support/h...?tutorials.htm

            I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._resources.htm

            You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
            Click here to see our NinjaScript Reference Samples: http://www.ninjatrader.com/support/f...splay.php?f=30
            Click here to see our NinjaScript Tips: http://www.ninjatrader.com/support/f...ead.php?t=3229

            These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

            There is a also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there: http://www.ninjatrader.com/support/f...splay.php?f=37
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Paul View Post
              Hello Dolfan,

              Thanks for your post.

              If you would like to take on learning NinjaScript, we have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.
              A link to our Help Guide can be found below: http://www.ninjatrader.com/support/h...?tutorials.htm

              I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._resources.htm

              You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
              Click here to see our NinjaScript Reference Samples: http://www.ninjatrader.com/support/f...splay.php?f=30
              Click here to see our NinjaScript Tips: http://www.ninjatrader.com/support/f...ead.php?t=3229

              These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

              There is a also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there: http://www.ninjatrader.com/support/f...splay.php?f=37
              Thanks Paul. I'll take a look at all of this. Specifically, I am looking to make an indicator that will return a % change in the Market Analyzer. So far to date, I have not seen where one can write or modify a script for the Market Analyzer. Will I find it in this tutorials? Thanks once again!

              Best regards,

              Dolfan

              Comment


                #8
                Hello Dolfan,

                Thanks for the clarity of your question.

                Please note that we do have a forum section specifically for the Market Analyzer. Any further Market Analyzer questions should be placed there: http://www.ninjatrader.com/support/f...splay.php?f=18

                Indicators can be added to the Market Analyzer, they do not have to be specifically written for the Market Analyzer. Here is a link to a thread of such a discussion http://www.ninjatrader.com/support/f...ad.php?t=73552
                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  Changing Overlay Indicators into Up Down Arrows

                  Hi,

                  I am trying to change the bwAlligator indicator overlay to just appear in an arrow UP or Arrow Down when prices close above or below the overlays. I do not need the overlays to be present as my current chart template has various moving averages and it would be more cluttered.


                  Also I am trying to change my trading strategy into a indicator which gives a buy Up Arrow or Sell Down arrow (i do not want it to be an autotrader just an indicator). This is based on the bwAlligator combined with parabolic SAR, RSI and MACD crossovers. I have read the threads on copying the codes into an indicator but seem to generate all errors and I am not sure where to start. My code for this is as follows:

                  protected override void OnBarUpdate()
                  {
                  // Condition set 1
                  if (CrossAbove(Close, bwAlligator().Jaw, 1)
                  && Close[0] > ParabolicSAR(0.01, 0.2, 0.01)[0]
                  && MACD(5, 10, 3)[0] > MACD(5, 10, 3).Avg[0]
                  && Close[0] > EMA(200)[0]
                  && RSI(14, 3).Avg[0] > 50)
                  {
                  EnterLong(DefaultQuantity, "");
                  }

                  // Condition set 2
                  if (Close[0] < EMA(28)[0]
                  && MACD(12, 26, 9)[0] < MACD(12, 26, 9).Avg[0])
                  {
                  ExitLong("", "");
                  }

                  // Condition set 3
                  if (CrossBelow(Close, bwAlligator().Jaw, 1)
                  && Close[0] < ParabolicSAR(0.01, 0.2, 0.01)[0]
                  && MACD(5, 10, 3)[0] < MACD(5, 10, 3).Avg[0]
                  && Close[0] < EMA(200)[0]
                  && RSI(14, 3).Avg[0] < 50)
                  {
                  EnterShort(DefaultQuantity, "");
                  }

                  // Condition set 4
                  if (Close[0] > EMA(50)[0]
                  && MACD(12, 26, 9)[0] > MACD(12, 26, 9).Avg[0])
                  {
                  ExitShort("", "");
                  }
                  }

                  Much appreciated.

                  Thanks.

                  Comment


                    #10
                    Hello dwwtan,

                    Thanks for your post.

                    What I recommend is that you use the indicator wizard (Tools>New Ninjascript> indicator) to create a Ninjascript file that will have all the structure needed for an indicator. After you have a new Ninjascript file, copy and paste your code into the OnBarUpdate() method. You will want to keep track of the "{" "}" as you must have matching pairs. You will need to remove all your entry and exits as these will not be recognized in an indicator script. You can replace these with whatever drawing object you wish (arrows, dots, squares, triangles). Here is a link to DrawArrowDown and DrawArrowUp:
                    http://ninjatrader.com/support/helpG...warrowdown.htm
                    http://ninjatrader.com/support/helpG...rawarrowup.htm
                    Paul H.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by gplatis
                      One similar question, Paul, regarding another (vendor's- black box) indicator which is installed on my NT7 indicators list BUT it is not appeared in the "wizard" indicators list ! The question is this : iiin the above code line :
                      if (CrossAbove(Close, bwAlligator().Jaw, 1)
                      if I replace the "bwAlligator().Jaw" with the name of another ("black -box"/vendor's) indicator will the strategy code (or another similar strategy code) work ?
                      This problem is general : Can we write startegy codes using "black-boxes" (vendors') indicators ? and how can we insert such indicators in a strategy code to make this strategy working with these ("black-boxes") indicators?
                      Any tip ?
                      Please advice.
                      Thank you.
                      The simplest way is to contact the vendor and ask for information on what properties are exposed, and how to call the indicator itself. This is standard programming information, and will usually be given if requested. At least we always give any such requested information.

                      Often, however, if the meta data is not masked, Intelllisense will tell you most, if not all, of what you need/want to know.

                      Comment


                        #12
                        Hello gplatis,

                        Thanks for your post.

                        I agree with member Koganam's thought to contact the vendor directly.
                        Paul H.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Brevo, Today, 01:45 AM
                        0 responses
                        3 views
                        0 likes
                        Last Post Brevo
                        by Brevo
                         
                        Started by aussugardefender, Today, 01:07 AM
                        0 responses
                        3 views
                        0 likes
                        Last Post aussugardefender  
                        Started by pvincent, 06-23-2022, 12:53 PM
                        14 responses
                        239 views
                        0 likes
                        Last Post Nyman
                        by Nyman
                         
                        Started by TraderG23, 12-08-2023, 07:56 AM
                        9 responses
                        384 views
                        1 like
                        Last Post Gavini
                        by Gavini
                         
                        Started by oviejo, Today, 12:28 AM
                        0 responses
                        6 views
                        0 likes
                        Last Post oviejo
                        by oviejo
                         
                        Working...
                        X