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

Basic Strategy Building Help

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

    Basic Strategy Building Help

    Hey all, I'm new here and would like help building a basic watch list with the following parameters

    price between 6-60
    macd 12,26,9 >= ema 9
    stoch 30 >= %k of 15

    thanks,

    Brian

    #2
    Hello thesoyboy2,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    For a watch list in NinjaTrader you would need to use the Market Analyzer and add the custom indicator as a column to the Market Analyzer. Or you would need to add the list of instrument into the code, but this can result in a very large of amount of programming that is unnecessary considering the previous option for the Market Analyzer.

    As far as the conditions, you would need to build these in an indicator. Below is the code for the first two conditions:
    Code:
    if(Close[0] >= 6 && Close[0] < 60 && MACD(12, 26, 9)[0] >= EMA(9)[0])
    For the stochastics you will need more parameters, please visit the following link for information on the Stochastics indicator method: http://www.ninjatrader.com/support/h...tochastics.htm

    We have Premium Paid Educational events designed to provide you with an in depth look at programming indicators and automated strategies through the use of NinjaScript:


    If you would like to take on learning NinjaScript on your own, 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...stribution.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

    If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
    Click here for a list of certified NinjaScript Consultants: http://www.ninjatrader.com/Ecosystem/NonBroker.php#81

    Please let me know if you have any questions.

    Comment


      #3
      EOD scan possible

      Thanks for the detailed response.

      As for the Stoch I would like 30 period with %K 15 crossing %D of 5

      Also, is it possible to scan EOD if I'm starting out with Kinetick EOD?

      thanks....

      Comment


        #4
        Hello thesoyboy2,

        Thank you for your response.

        The 15 K crossing above the 5 D would be the following:
        Code:
        			if(CrossAbove(Stochastics(5, 15, 3).K, Stochastics(5, 15, 3).D, 1))
        			{
        				//Do something
        			}
        For the 30 period of the Stochastic, do you know which period this will be for the equation of the stochastics? PeriodK, PeriodD or Smooth.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        9 views
        0 likes
        Last Post burtoninlondon  
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        14 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Yesterday, 08:42 PM
        0 responses
        11 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Yesterday, 07:51 PM
        0 responses
        13 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,983 views
        3 likes
        Last Post jhudas88  
        Working...
        X