NinjaTrader Simple RSI System (Adapted)
Introduction and Rules
First, these ideas were adapted from Matt Haines blog throwinggoodmoney, which was posted on Jeff Swanson website System Trader Success. I highly recommend you check out both sites. This is a two part post where we will explore the concepts presented in the Simple RSI System and Part 2 will cover the Simple PIRDPO System. The rules for the RSI System are:
- Use Daily data for all the below rules
- When RSI(2) is less than or equal to 12, BUY at the Open of the next day
- When price closes above your entry price, EXIT (do not BUY and EXIT the same day)
- Ten days after entry, EXIT
Indicator Settings
This should be relatively straight forward to put into NinjaTrader, but instead of only using Daily data, I want to test this system on other data as well, so let’s build something a little more dynamic. Also, I want to test what happens if we add a profit target, stop loss, and exit prior to the close on an exit day. The options in the strategy are as follows:
- Wait for Reset: if set to true, the strategy will only trade if the prior bar did not have a signal (i.e. RSI(2)[1] > 12). If set to false and you exit a trade when RSI(2)[0] and RSI(2)[1] is less than or equal to 12, another position will be opened
- Period: Period used for RSI
- Threshold: Threshold to signal buy setup
- Buy Background: Color of background when RSI(2)[0] <= 12
- Use Daily: If set to true, will calculate RSI based on daily data. If set to false, will use Minute data based on the input in #6
- MTF Period (minutes): If #5 is set to false, this will be the period used for minute data (e.g. if set to 480, 480 minute bars will be used to backtest)
- Use Exit One: If set to true will use EXIT condition “When price closes above your entry price, EXIT (do not BUY and EXIT the same day)”
- Use Alt Exit: If an EXIT condition exists, as defined above, the EXIT will be evaluated after the exit time in #9
- Exit Time: If set to true, will evaluate EXIT condition. For example, if you run a backtest on a 5 minute bar and this is set to 1550, on the open of the 1555 bar, the EXIT conditions will be evaluated and exit instead of waiting until the next days open
- Use Profit Target: If set to true the strategy will set a profit target
- Profit Target (ticks): If #10 set to true, the number of ticks will be used as the profit target
- Use Stop Loss: If set to true the strategy will set a stop loss
- Stop Loss (ticks): If #12 set to true, the number of ticks will be used as the stop loss
- Days Expire: After X bars from the entry day, the position will be closed
- Order Quantity: Quantity used in backtest
- Use commission: No
- Slippage: 1 tick
Backtest Results
Now for the backtest. For the first backtest we will use the default settings:
[envira-gallery id=”3490″]
The backtest using the Alternative Exit:
[envira-gallery id=”3494″]
Profit target of 40 ticks (10 points), 30 day expire, and Exit One = False
[envira-gallery id=”3498″]
Backtest with default settings, but expire days = 20:
[envira-gallery id=”3503″]
Backtest with default settings, but on 480 minute bar:
[envira-gallery id=”3507″]
Summary
All in all, the backtest for this strategy looks great! One of the most important findings was that when the number of Days Expire is expanded to 20, or even 30, profitability was increased without a major negative impact on draw-down. I will leave you with one last backtest using a 80 point profit target, Exit One = False, and Days Expire = 30. DOWNLOAD THE FREE NINJATRADER 8 STRATEGY HERE.
[envira-gallery id=”3511″]
HYPOTHETICAL PERFORMANCE DISCLAIMER: HYPOTHETICAL PERFORMANCE RESULTS HAVE MANY INHERENT LIMITATIONS, SOME OF WHICH ARE DESCRIBED BELOW. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFITS OR LOSSES SIMILAR TO THOSE SHOWN; IN FACT, THERE ARE FREQUENTLY SHARP DIFFERENCES BETWEEN HYPOTHETICAL PERFORMANCE RESULTS AND THE ACTUAL RESULTS SUBSEQUENTLY ACHIEVED BY ANY PARTICULAR TRADING PROGRAM. ONE OF THE LIMITATIONS OF HYPOTHETICAL PERFORMANCE RESULTS IS THAT THEY ARE GENERALLY PREPARED WITH THE BENEFIT OF HINDSIGHT. IN ADDITION, HYPOTHETICAL TRADING DOES NOT INVOLVE FINANCIAL RISK, AND NO HYPOTHETICAL TRADING RECORD CAN COMPLETELY ACCOUNT FOR THE IMPACT OF FINANCIAL RISK OF ACTUAL TRADING. FOR EXAMPLE, THE ABILITY TO WITHSTAND LOSSES OR TO ADHERE TO A PARTICULAR TRADING PROGRAM IN SPITE OF TRADING LOSSES ARE MATERIAL POINTS WHICH CAN ALSO ADVERSELY AFFECT ACTUAL TRADING RESULTS. THERE ARE NUMEROUS OTHER FACTORS RELATED TO THE MARKETS IN GENERAL OR TO THE IMPLEMENTATION OF ANY SPECIFIC TRADING PROGRAM WHICH CANNOT BE FULLY ACCOUNTED FOR IN THE PREPARATION OF HYPOTHETICAL PERFORMANCE RESULTS AND ALL WHICH CAN ADVERSELY AFFECT TRADING RESULTS.
Leave a Reply