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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        60 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        146 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        284 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X