Esempio n. 1
0
        public ATSStop SetStop(Position position, DateTime dateTime)
        {
            ATSStop aTSStop = new ATSStop(position, dateTime);

            base.Strategy.AddStop(aTSStop);
            return(aTSStop);
        }
 internal void AddStop(ATSStop stop)
 {
     this.stops.Add(stop);
     this.activeStops[stop.Instrument].Add(stop);
     stop.StatusChanged += new StopEventHandler(this.stop_StatusChanged);
     base.EmitStopAdded(stop);
 }
Esempio n. 3
0
        public ATSStop SetStop(Position position, double level, StopType type, StopMode mode)
        {
            ATSStop aTSStop = new ATSStop(position, level, type, mode);

            base.Strategy.AddStop(aTSStop);
            return(aTSStop);
        }
        internal void OnStopExecuted(ATSStop stop)
        {
            this.atsRuntimeCrossComponent.OnStopExecuted(stop);
            /*---------------------------------------------------*/
            ATSComponent aTSComponent = this.atsComponents[stop.Instrument];

            if (aTSComponent != null)
            {
                aTSComponent.OnStopExecuted(stop);
            }
            /*---------------------------------------------------*/
            //this.atsComponents[stop.Instrument].OnStopExecuted(stop);
        }
        private void stop_StatusChanged(StopEventArgs args)
        {
            ATSStop aTSStop = args.Stop as ATSStop;

            if (aTSStop.Status != StopStatus.Active)
            {
                this.activeStops[aTSStop.Instrument].Remove(aTSStop);
            }
            this.OnStopStatusChanged(aTSStop);
            if (aTSStop.Status == StopStatus.Executed)
            {
                this.OnStopExecuted(aTSStop);
            }
            if (aTSStop.Status == StopStatus.Canceled)
            {
                this.OnStopCanceled(aTSStop);
            }
            base.EmitStopStatusChanged(aTSStop);
        }
Esempio n. 6
0
 public virtual void OnStopExecuted(ATSStop stop)
 {
 }
Esempio n. 7
0
 public virtual void OnStopCanceled(ATSStop stop)
 {
 }
Esempio n. 8
0
 public virtual void OnStopStatusChanged(ATSStop stop)
 {
 }