Let use a simple example on Moving average crossover system.
Lets trade using 1 min charts.
On lunch of strategy, I would like to programmatically activate backtester and see what would be the best combination of MA crosses in the last hour.
Then I would like to use results of optimization and use those parameters.
After an hour of live trading , I would like to repeat optimization and adjust my moving averages again.
Is there a way of doing this with Ninja trader? Nija Trader 8?
Can I initite backtest optimization programmatically and pick up the results?
I understand that solid C# programing ability would be required.
How to conver a simple moving average crossver system into a self optimizing system which will set new moving average parmeters every hour
//btypical Example #1
// If an open position already exists, subsequent EnterLong() calls are ignored.
protected override void Initialize()
{
EntriesPerDirection = 1;
EntryHandling = EntryHandling.AllEntries;
}
protected override void OnBarUpdate()
{
if (CrossAbove(SMA(10), SMA(20), 1)
EnterLong("SMA Cross Entry");
if (CrossAbove(RSI(14, 3), 30, 1)
EnterLong("RSI Cross Entry);
}
Comment