A collection of automated trading strategies for NinjaTrader 8, implementing market analysis and position management techniques.
This repository contains two main trading strategies:
- StraightStrat: A comprehensive trading strategy with dynamic position sizing and risk management
- OneR: A modified version with tighter risk controls and Bollinger Band integration
- Real-time market analysis
- Automated entry and exit signals
- Built-in risk management
- Session time controls (7:00 AM - 3:00 PM)
- Breakeven stop-loss automation
- Multi-instrument support (NQ, YM, RTY)
- Multiple entry conditions based on price action
- Dynamic profit targets and stop losses
- Support for up to 8 entries per direction
- Default position size of 3 contracts
- Customizable profit target ($10,000) and loss limit (-$10,000)
- Bollinger Band integration for trade confirmation
- More conservative position sizing (1 contract)
- Tighter profit target ($1,500) and loss limit (-$1,100)
- Support for up to 4 entries per direction
- Enhanced risk management with smaller stop losses
Both strategies implement the following trade setups:
- One-Bar Pattern Trading
- Two-Bar Pattern Trading
- Failed Break Pattern Trading
- Breakeven Stop Management
- Price action pattern recognition
- Candlestick analysis
- Previous high/low breach detection
- Volume analysis
- Technical indicator confirmation (Bollinger Bands)
- Automated stop-loss placement
- Dynamic breakeven stops
- Daily profit/loss limits
- Session time restrictions
- Position size management
- Clone the repository
- Copy the strategy files to your NinjaTrader custom strategies folder:
Documents\NinjaTrader 8\bin\Custom\Strategies\
- Launch NinjaTrader 8
- Import the strategies through the Strategy Analyzer
- Open NinjaTrader 8
- Navigate to the Strategies tab
- Select either StraightStrat or OneR
- Configure the following parameters:
- Time frame
- Session times
- Position size
- Risk limits
profitTarget: Daily profit targetlossLimit: Daily loss limitstopLoss: Per-trade stop losstakeProfit: Per-trade profit targetcontracts: Number of contracts per trade
-
Apply the strategy to a chart:
- Right-click on chart
- Select Strategies
- Choose StraightStrat or OneR
-
Configure strategy parameters:
- Set risk parameters
- Adjust time frames
- Select instruments
-
Enable strategy automation:
- Click the "Auto Trade" button
- Confirm strategy activation
- NinjaTrader 8 platform
- Valid brokerage account
- Market data subscription
- Minimum system requirements:
- Windows 10 or later
- 8GB RAM
- Stable internet connection
Trading carries significant financial risk. These strategies are for educational and research purposes only. Always test thoroughly in a simulation environment before live trading.