Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help implementing a trading system

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

    Help implementing a trading system

    I'd like to implement a simple trading system and I'm kind of stuck. I think I understand the basics of ninjatrader's strategies and I've been writing basic little strategies and backtesting them. But I cannot figure out how to get this into a system.

    The system is to take the S&P 500 and buy max 3 stocks with the lowest stoch, and the stoch must be under 20. These would be held until loss, profit, or time stop is hit and then a slot would open up to buy another one (up to max 3).

    I can see how NT will run a strategy against a symbol or even an instrument list, but that seems to be it. Unless I'm really missing something. To me it seems very adapted to running individual strategies on specific instruments. But how does that fit into a working system with money management?

    If this is covered somewhere please just point me in the right direction. I've looked but didn't find it.

    Thanks

    #2
    Hello,


    Multi time frames and instruments within one strategy is possible:


    However this will take advance programming.
    DenNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Ben View Post
      Hello,


      Multi time frames and instruments within one strategy is possible:


      However this will take advance programming.
      It's me again, I'm back. I've been looking around at other products and I keep coming back to Ninjatrader. I'd really like to get this to work with Ninjatrader and I don't mind advanced programming (at this point I don't think any product can do it without advanced programming).

      Can you give me some more hints? I'm reading the documentation but I'm still not sure how to do it. Let me break the system down into parts:

      1 - scan the S&P 500 for the lowest 3 stoch values
      2 - determine a stop level - could be a set percentage, could be x day low, could be low of previous bar, etc.
      3 - Determine how many shares to buy. This would be done by using 2% of the account value as the maximum risk, dividing that amount by the risk of the trade per share, which gives the number of shares.
      4 - Buy the stock(s)
      5 - Exit on criteria

      If someone could give me some pointers for each of these steps, I'll read through the documentation and search the forums and try to get up to speed on it. It could be a group effort if others are interested.

      Thanks

      Comment


        #4
        1. Use multi-instrument strategy. Add("^SP500", PeriodType.Minute, 1);
        2. You will need to program logic to figure that out yourself.
        3. Use AccountSize to run your calculations off of.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          1. Use multi-instrument strategy. Add("^SP500", PeriodType.Minute, 1);
          2. You will need to program logic to figure that out yourself.
          3. Use AccountSize to run your calculations off of.
          Thanks for the pointer on the multi-instrument strategy. This multi-instrument makes sense to me.

          However, I don't see how I can find the 3 stocks from the S&P 500 (or any other instrument list) with the lowest stoch value.

          Would I have to do this:

          Code:
              Add("AAPL", PeriodType.Minute, 1);
          for each of the 500 stocks and then sort them by the EOD stoch value? Is there an easier way?

          Comment


            #6
            Correct, you would have to add 500 stocks to the strategy.
            RayNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Ray View Post
              Correct, you would have to add 500 stocks to the strategy.
              Ok, I think I understand what I need to do now. I thought there would be less programming involved but at least the programming seems relatively straightforward to me.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by algospoke, Yesterday, 06:40 PM
              2 responses
              19 views
              0 likes
              Last Post algospoke  
              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
              45 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
              181 views
              0 likes
              Last Post jeronymite  
              Working...
              X