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

20 SMA strategy

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

    20 SMA strategy

    hello everyone,

    I am new here and looking for some help to creat a simple strategy for ninja 7.

    I want to buy when a closed price is crossed over the 20 simple moving average, and go short when a price is closed lower than 20 SMA, all that with trailing stop of 10 ticks away from 20 SMA.

    Any help please.
    Attached Files

    #2
    hello allasafi,
    Please watch this attached video. It is very good for beginners, like me and you, to learn how to code your own strategy. Then, proceed to Pablos channel. What a great teacher!!
    If you need further assistance continue to ask!!

    On this video we show the Strategy Builder included on NinjaTrader 8, previously called Strategy Wizard on Ninja 7.We demonstrate how to use it to create a s...

    Comment


      #3
      Hello alassafi,

      For NinjaTrader 7 you can create this strategy in the Strategy Wizard.

      However, an SMA with a period of 20 is never going to cross an SMA with a period of 20. They would be the same line and would never cross. It would make more sense for the periods of the SMA to be different.

      On the Conditions and Actions page in Set 1 Add a new condition. On the left select Indicators > SMA > set Period to 20. In the center select CrossAbove. On the right select Indicators > SMA > set Period to 20.
      On the Stops and targets page click Add > select Trailing stop > set Mode to Ticks, set Value to 10.

      Below is a public link to the NinjaTrader training video Strategy Wizard 301 hosted on YouTube. This video demonstrates how to setup an SMA cross over strategy.


      Also, below is a link to a forum post with helpful information about getting started with NinjaScript.
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by jclose, Today, 09:37 PM
      0 responses
      5 views
      0 likes
      Last Post jclose
      by jclose
       
      Started by WeyldFalcon, 08-07-2020, 06:13 AM
      10 responses
      1,413 views
      0 likes
      Last Post Traderontheroad  
      Started by firefoxforum12, Today, 08:53 PM
      0 responses
      11 views
      0 likes
      Last Post firefoxforum12  
      Started by stafe, Today, 08:34 PM
      0 responses
      11 views
      0 likes
      Last Post stafe
      by stafe
       
      Started by sastrades, 01-31-2024, 10:19 PM
      11 responses
      169 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X