Exemplo n.º 1
0
 /// <summary>
 /// Constructor with all data and parameter
 /// </summary>
 /// <param name="d"></param>
 /// <param name="p"></param>
 public GenericStrategy(AnalysisData d, Parameters p)
 {
     this.data = d;
     this.parameters = p;
     if (adviceInfo == null)
         this.adviceInfo = new TradePoints();
     this.last_position = 0;
     this.trailing_stop = -1;
 }
Exemplo n.º 2
0
 //virtual public TradePoints Execute(AnalysisData data, double[] paras)
 virtual public TradePoints Execute(AnalysisData data, double[] paras)
 {
     this.data = data;
     parameters = new Parameters(paras);
     //??Bug fixed by Dung 11 Nov 2011
     if (adviceInfo == null)            
         adviceInfo = new TradePoints();
     StrategyExecute();
     return adviceInfo;
 }
Exemplo n.º 3
0
 public StockFastRule(DataBars db,Parameters parameters)
 {
     stoch = Indicators.StochF.Series(db, parameters[0], parameters[1], "");
     line1 = stoch.FastKSeries;
     line2 = stoch.FastDSeries;
 }