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 RubenCazorla, Today, 09:07 AM
      1 response
      5 views
      0 likes
      Last Post RubenCazorla  
      Started by Irukandji, Today, 09:34 AM
      0 responses
      3 views
      0 likes
      Last Post Irukandji  
      Started by TraderBCL, Today, 04:38 AM
      3 responses
      25 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by WeyldFalcon, 08-07-2020, 06:13 AM
      11 responses
      1,423 views
      0 likes
      Last Post jculp
      by jculp
       
      Started by BarzTrading, Today, 07:25 AM
      2 responses
      29 views
      1 like
      Last Post BarzTrading  
      Working...
      X