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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        50 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        16 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        22 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X