Exemple #1
0
 public override void init(Object caller, Dictionary <String, String> inputArgs, TickerInfo info)
 {
     stgManager   = (AppStrategyManager)caller;
     execution    = new SignalContext();
     eventManager = stgManager.getAppEventManager();
     MDManager    = stgManager.getAppMDManager();
     stgHelper    = new StrategyHelper(stgManager, stgName, stgIndex, execution);
     WTS          = info.whatToShow;
 }
Exemple #2
0
 public override void init(Object caller, Dictionary <String, String> inputArgs, TickerInfo info)
 {
     stgManager     = (AppStrategyManager)caller;
     execution      = new SignalContext();
     stgHelper      = new StrategyHelper(stgManager, stgName, stgIndex, execution);
     eventManager   = stgManager.getAppEventManager();
     MDManager      = stgManager.getAppMDManager();
     WTS            = info.whatToShow;
     this.inputArgs = inputArgs;
     num_short_ma   = Double.Parse(inputArgs["PARA1"]);
     orderSize      = Int32.Parse(inputArgs["PARA2"]);
     cutLoss        = Double.Parse(inputArgs["PARA3"]);
     profitTarget   = Double.Parse(inputArgs["PARA4"]);
     log.Info(stgName + " Started !");
     log.Info("short_ma = " + num_short_ma);
     log.Info("long_ma = " + num_long_ma);
     log.Info("cutLoss = " + cutLoss);
     log.Info("profitTarget = " + profitTarget);
 }