Exemplo n.º 1
0
        public int ObjectsTotal(MetaObjectType type)
        {
            AsyncCommand cmd = new AsyncCommand(Commands.ObjectsTotal, new object[] { (int)type });

            ExecuteCommand(cmd);
            return((int)cmd.Result);
        }
Exemplo n.º 2
0
        public int ObjectsDeleteAll(int window, MetaObjectType type)
        {
            AsyncCommand cmd = new AsyncCommand(Commands.ObjectsDeleteAll, new object[] { window, (int)type });

            ExecuteCommand(cmd);
            return((int)cmd.Result);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Создание нового либо загрузка существующего метаобъекта.
        /// </summary>
        /// <param name="type"></param>
        /// <param name="StrIdentifier"></param>
        /// <returns></returns>
        public MetaObject CreateOrLoadMetaObject(MetaObjectType type, string StrIdentifier)
        {
            MetaObject mo = CreateNewMetaObject(type, StrIdentifier);

            if (mo == null)
            {
                mo = LoadMetaObject(StrIdentifier);
            }
            return(mo);
        }
Exemplo n.º 4
0
        public bool ObjectCreate(string name, MetaObjectType type, int window, DateTime time1, int price1, DateTime time2, int price2, DateTime time3, int price3)
        {
            string symbol = Symbol();

            AsyncCommand aCmd = new AsyncCommand(Commands.ObjectCreate,
                                                 new object[] { name, (int)type, window, Convertor.DateTimeToSeconds(time1), Convertor.TranslateFromPipPrice(symbol, price1),
                                                                Convertor.DateTimeToSeconds(time2), Convertor.TranslateFromPipPrice(symbol, price2),
                                                                Convertor.DateTimeToSeconds(time3), Convertor.TranslateFromPipPrice(symbol, price3) });

            return((bool)ExecuteCommand(aCmd));
        }
Exemplo n.º 5
0
 public int ObjectsDeleteAll(int window, MetaObjectType type)
 {
     return(0);
 }
Exemplo n.º 6
0
 public bool ObjectCreate(string name, MetaObjectType type, int window, DateTime time1, int price1, DateTime time2, int price2, DateTime time3, int price3)
 {
     return(false);
 }
Exemplo n.º 7
0
 public int ObjectsTotal(MetaObjectType type)
 {
     return(0);
 }
Exemplo n.º 8
0
 public MetaObject CreateNewMetaObject(MetaObjectType type, string StrIdentifier)
 {
     return(CreateNewMetaObject(type.ToString(), StrIdentifier));
 }