Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SMA Crossover

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

    SMA Crossover

    Hi, I'm new to NT and working on some simple back testing of SMA crossover. The problem is I'm not very 'techie'. Can anyone provide direction on building a NinjaScript that goes to cash when SMA crosses over adj closing price by more than 5% and long when it crosses under?

    I've tried to get it to work but for some reason my results aren't coming out as expected.

    #2
    ktinn,

    I would suggest watching our strategy development video.



    From here you can modify things to include close price instead of a SMA on one side, as well as modify for the rest of your conditions.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Thanks, I've gotten everything to work, but can't figure out how I set it to be +/- 5% when the SMA crosses over closing price. Any help would be appreciated.
      Thanks

      Comment


        #4
        ktinn, I've also replied to your note sent to support - can you please clarify what you mean here as filter? What would the adjusted closing price be? SMA vs Close[0] + - 5%?

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        648 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X