Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

trying to code a ninja script strategy (not sure where to start)

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

    trying to code a ninja script strategy (not sure where to start)

    Hello,

    I am having trouble building a more complex mechanical trading sytem that also allows me to include a somewhat accurate backtest. The example of a system I am trying to create would include the following:
    Trading Setup
    • Trade on daily chart (swing trading)
    • 5 SMA applied to the close
    • 10 SMA applied to the close
    • Stochastic (14,3,3)
    • RSI (9)


    Trading Rules
    Entry Rules
    Enter long (IJR) if:
    • The 5 SMA crosses above the 10 SMA and both stochastic lines are heading up (do not enter if the stochastic lines are already in the overbought territory)
    • RSI is greater than 50
    Enter short (SBB) if:
    • The 5 SMA crosses below the 10 SMA and both stochastic lines are heading down AND (do not enter if the stochastic lines are already in oversold territory)
    • RSI is less than 50
    Exit Rules (Go into Bonds or Money Market)
    • Exit when the 5 SMA crosses the 10 SMA in the opposite direction of your trade OR if RSI crosses back to 50
    • Exit when trade hits stop loss of -3%

    My main concern is to be able to back test more complex strategies that allow me to go back and forth between long trades , short trades, and bonds, (back and forth between the IJR, SBB, and some type of bond or money market fund). Is this achievable through ninja script? Does anyone have any sripts that are somewhat similar. Any advice would be greatly appreciated.

    Thanks in advance!

    #2
    Hi there, in the future, please don't send in the same request three times. This is the second post on the forum after the initial email. We don't have a full staff on weekends, so responses can take some time.
    AustinNinjaTrader Customer Service

    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
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    573 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    575 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X