NinjaTrader SMA Martingale Strategy
Budget: $30 – $250 USD
I need a NinjaTrader 8 automated strategy, written in clean, well-commented NinjaScript/C#, that trades any futures contract using the following logic:
1-Strategy must work in NT8 Strategy Analyzer for backtesting and optimization, Market Replay and realtime.
• Entry
– Long
– Wait for two consecutive bar closes above the 30-period simple moving average, then enter on the next bar.
– Trades are allowed only between 6:00 am and 10:00 am PST.
– Never hold more than one position at a time.
- Short opposite of long
• Exits
– Fixed 10-tick take-profit and 10-tick stop-loss.
• Position sizing (martingale style)
Sequence after each losing trade: 1 → 1 → 3 → 7 → 10 → 15 contracts.
If a trade is profitable or six consecutive losses occur, size resets to 1 contract.
There are no additional price-range or market-condition filters; the strategy should run as described on any futures symbol (ES, CL, GC, etc.) without modification.
Deliverables
1. An NT8 strategy file (.cs) ready to import.
2. Brief comments inside the code explaining key sections (entry logic, time filter, sizing algorithm).
3. A short README outlining parameter inputs and how to load the strategy.
I will verify the strategy in the NinjaTrader 8 simulator againstStrategy Analyzer for backtesting and optimization, Market Replay and realtime.
for different futures markets; contract sizing and trade timing must match the rules above before final acceptance.
1-Strategy must work in NT8 Strategy Analyzer for backtesting and optimization, Market Replay and realtime.
• Entry
– Long
– Wait for two consecutive bar closes above the 30-period simple moving average, then enter on the next bar.
– Trades are allowed only between 6:00 am and 10:00 am PST.
– Never hold more than one position at a time.
- Short opposite of long
• Exits
– Fixed 10-tick take-profit and 10-tick stop-loss.
• Position sizing (martingale style)
Sequence after each losing trade: 1 → 1 → 3 → 7 → 10 → 15 contracts.
If a trade is profitable or six consecutive losses occur, size resets to 1 contract.
There are no additional price-range or market-condition filters; the strategy should run as described on any futures symbol (ES, CL, GC, etc.) without modification.
Deliverables
1. An NT8 strategy file (.cs) ready to import.
2. Brief comments inside the code explaining key sections (entry logic, time filter, sizing algorithm).
3. A short README outlining parameter inputs and how to load the strategy.
I will verify the strategy in the NinjaTrader 8 simulator againstStrategy Analyzer for backtesting and optimization, Market Replay and realtime.
for different futures markets; contract sizing and trade timing must match the rules above before final acceptance.
Related categories:
C Programming
C# Programming
Metatrader
Financial Markets
C++ Programming
Risk Management
Backtesting
NinjaTrader