示例#1
0
 public int GetVolume(SuperParameters sparam)
 {
     if (_currentTicks > _maxTicks / 2)
     {
         return((int)(sparam.BasicVolume * 1.3));
     }
     return(sparam.BasicVolume);
     //if (lastMarketOrder == null)
     //    return sparam.BasicVolume;
     //if (lastMarketOrder.Profit > 0)
     //    return lastMarketOrder.Volume + sparam.BasicVolume;
     //else
     //    return Math.Max(sparam.BasicVolume, lastMarketOrder.Volume - 3 * sparam.BasicVolume);
 }
示例#2
0
 public bool IsWorkingTime(SuperParameters sparam, Tick <int> tick)
 {
     return(tick.DateTime.Hour >= sparam.StartHour && tick.DateTime.Hour < sparam.EndHour);
 }