Exemple #1
0
 internal Analysis(Specify specify, string key) : base(key)
 {
     this.specify = specify;
     Short        = new Stack <double>(512);
     Long         = new Stack <double>(512);
     info         = new Information(key);
 }
Exemple #2
0
        protected internal Trend(Specify specify)
        {
            this.specify = specify;
            Short        = new Stack <double>(512);
            Long         = new Stack <double>(512);

            foreach (Chart chart in Retrieve.Chart)
            {
                Analysize(chart);
            }
        }
Exemple #3
0
 internal void Save(Chart ch, Specify specify)
 {
     Revenue = CumulativeRevenue - Commission;
     SetStorage(new Logs
     {
         Code       = specify.Code,
         Assets     = specify.Assets,
         Strategy   = specify.Strategy,
         Date       = int.Parse(ch.Date.ToString().Substring(0, 6)),
         Unrealized = (long)(Quantity == 0 ? 0 : (Quantity > 0 ? ch.Price - PurchasePrice : PurchasePrice - ch.Price) * Const.TransactionMultiplier * Math.Abs(Quantity)),
         Revenue    = Revenue - TodayRevenue,
         Cumulative = CumulativeRevenue - Commission
     });
     TodayRevenue = Revenue;
 }