public Ticket OrderSend(Symbol symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment, int magic, MT4DateTime expiration, MT4Color arrow_color)
        {
            int number = mt4.OrderSend(symbol.symbol, cmd, volume, price, slippage, stoploss, takeprofit, comment, magic, expiration, arrow_color);


            if(number != -1)
            {
                Ticket ticket = new Ticket() { Number = number, Cmd = cmd == 0 ? "Ask" : "Bid", Symbol = symbol, date = DateTime.Now, Rate = cmd == 0 ? this.GetAsk(symbol) : this.GetBid(symbol), Status = Ticket.TicketStatus.STATUS_ORDERED};
                this.orderTicketList.Add(ticket);
                return ticket;
            }
            else
            {
                return null;
            }
        }
public int TimeDayOfWeek(MT4DateTime date)
{
return com.CallMql4<int>(CommunicationMql4.CALL_FUNC, "TimeDayOfWeek", date);
}
public int TimeYear(MT4DateTime date)
{
return com.CallMql4<int>(CommunicationMql4.CALL_FUNC, "TimeYear", date);
}
public int OrderModify(int ticket, double price, double stoploss, double takeprofit, MT4DateTime expiration, MT4Color arrow_color)
{
return com.CallMql4<int>(CommunicationMql4.CALL_FUNC, "OrderModify", ticket, price, stoploss, takeprofit, expiration, arrow_color);
}
public int OrderSend(string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment, int magic, MT4DateTime expiration, MT4Color arrow_color)
{
    return com.CallMql4<int>(CommunicationMql4.CALL_FUNC, "OrderSend", symbol, cmd, volume, price, slippage, stoploss, takeprofit, comment, magic, expiration, arrow_color);
}
Esempio n. 6
0
 public int OrderSend(string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment, int magic, MT4DateTime expiration, MT4Color arrow_color)
  {
      return _TicketNum++;
  }
public bool IsTradeAllowed(string symbol, MT4DateTime tested_time)
{
return com.CallMql4<bool>(CommunicationMql4.CALL_FUNC, "IsTradeAllowed", symbol, tested_time);
}
Esempio n. 8
0
 public int TimeSeconds(MT4DateTime date)
 {
     return 0;
 }
Esempio n. 9
0
 public int TimeYear(MT4DateTime date)
 {
     return 0;
 }
Esempio n. 10
0
 public int TimeMinute(MT4DateTime date)
 {
     return 0;
 }
Esempio n. 11
0
 public int TimeMonth(MT4DateTime date)
 {
     return 0;
 }
Esempio n. 12
0
 public int TimeHour(MT4DateTime date)
 {
     return 0;
 }
Esempio n. 13
0
 public int TimeDayOfWeek(MT4DateTime date)
 {
     return 0;
 }
Esempio n. 14
0
 public int TimeDay(MT4DateTime date)
 {
     return 0;
 }
Esempio n. 15
0
 public int OrderModify(int ticket, double price, double stoploss, double takeprofit, MT4DateTime expiration, MT4Color arrow_color)
 {
     return 0;
 }
Esempio n. 16
0
 public bool IsTradeAllowed(string symbol, MT4DateTime tested_time)
 {
     return true;
 }