Exemple #1
0
        public override void Deinitialize()
        {
            if (ZigZag_1 != null && ZigZag_2 != null)
            {
                switch (trader_type)
                {
                case (TradeType.STANDART):
                    ZigZag_1.ProcessorAction += EventHandler_1;
                    ZigZag_2.ProcessorAction += EventHandler_2;
                    break;

                case (TradeType.IN_OUT):
                    ZigZag_1.ProcessorAction += EventHandler_1_type2;
                    ZigZag_2.ProcessorAction += EventHandler_2_type2;
                    break;

                default:
                    ZigZag_1.ProcessorAction += EventHandler_1_type2;
                    ZigZag_2.ProcessorAction += EventHandler_2_type2;
                    if (ZigZag_2_2 != null)
                    {
                        ZigZag_2_2.ProcessorAction += EventHandler_2_2_type2;
                    }
                    break;
                }
            }
            if (Gap != null)
            {
                Gap.ProcessorAction -= PositionHandler;
            }
            tradeTerminal.Stop();
        }
Exemple #2
0
 public override void Deinitialize()
 {
     if (ZigZag != null)
     {
         ZigZag.ProcessorAction -= EventHandlerBig;
     }
     if (Gap != null)
     {
         Gap.ProcessorAction -= PositionHandler;
     }
     if (ZigZagSmall != null)
     {
         ZigZagSmall.ProcessorAction -= EventHandlerSmall;
     }
     tradeTerminal.Stop();
 }