NinjaMonitor 3 - Keep an eye on your automated strategies from anywhere
> Strategy Settings Template
This is a little tip we've developed using NinjaTrader that can be useful, so I'll be sharing it here.
As you know, a NinjaTrader Strategy can have many 'inputs'. Sometimes you can have one strategy that you wish to run in different charts with different input settings.
By default in NinjaTrader, the only way, would be to write down your settings and for each graph insert the strategy with the correct settings.
As you can imagine, this can be quite fragile, especially if you need to re-insert a strategy after a crash.
Say we have our main strategy, and 4 different charts we wish to insert it in, each with different settings.
Our trick, is to use the advantages of Object Oriented Programming.
So our main strategy, would be our "base" class, and we'll create 4 new strategies, each of them will only contain the settings.
NinjaTrader uses the Initialize() method to read inputs, so we'll put our new settings in there.
Now for some code...
public class MyStrategy1 : MainStrategy
protected override void Initialize()
base.Initialize(); // Make sure we call the base class Initialize Method
posted 4 years ago
©2011-2013 ninjamonitor.com - all rights reserved - current version: 188.8.131.52 -