mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-15 03:38:09 +00:00
Updated functions OrderSendBuy, OrderSendSell. Version 1.0.23
This commit is contained in:
+16
-8
@@ -134,26 +134,34 @@ namespace MtApi
|
||||
|
||||
public int OrderSendBuy(string symbol, double volume, int slippage)
|
||||
{
|
||||
var commandParameters = new ArrayList { symbol, volume, slippage};
|
||||
return sendCommand<int>(MtCommandType.OrderSendBuy, commandParameters);
|
||||
return OrderSendBuy(symbol, volume, slippage, 0, 0, null, 0);
|
||||
}
|
||||
|
||||
public int OrderSendSell(string symbol, double volume, int slippage)
|
||||
{
|
||||
var commandParameters = new ArrayList { symbol, volume, slippage };
|
||||
return sendCommand<int>(MtCommandType.OrderSendSell, commandParameters);
|
||||
return OrderSendSell(symbol, volume, slippage, 0, 0, null, 0);
|
||||
}
|
||||
|
||||
public int OrderSendBuy(string symbol, double volume, int slippage, double stoploss, double takeprofit)
|
||||
{
|
||||
var commandParameters = new ArrayList { symbol, volume, slippage, stoploss, takeprofit };
|
||||
return sendCommand<int>(MtCommandType.OrderSendBuyStoplossProfit, commandParameters);
|
||||
return OrderSendBuy(symbol, volume, slippage, stoploss, takeprofit, null, 0);
|
||||
}
|
||||
|
||||
public int OrderSendSell(string symbol, double volume, int slippage, double stoploss, double takeprofit)
|
||||
{
|
||||
var commandParameters = new ArrayList { symbol, volume, slippage, stoploss, takeprofit };
|
||||
return sendCommand<int>(MtCommandType.OrderSendSellStoplossProfit, commandParameters);
|
||||
return OrderSendSell(symbol, volume, slippage, stoploss, takeprofit, null, 0);
|
||||
}
|
||||
|
||||
public int OrderSendBuy(string symbol, double volume, int slippage, double stoploss, double takeprofit, string comment, int magic)
|
||||
{
|
||||
var commandParameters = new ArrayList { symbol, volume, slippage, stoploss, takeprofit, comment, magic };
|
||||
return sendCommand<int>(MtCommandType.OrderSendBuy, commandParameters);
|
||||
}
|
||||
|
||||
public int OrderSendSell(string symbol, double volume, int slippage, double stoploss, double takeprofit, string comment, int magic)
|
||||
{
|
||||
var commandParameters = new ArrayList { symbol, volume, slippage, stoploss, takeprofit, comment, magic };
|
||||
return sendCommand<int>(MtCommandType.OrderSendSell, commandParameters);
|
||||
}
|
||||
|
||||
public bool OrderClose(int ticket, double lots, double price, int slippage, Color color)
|
||||
|
||||
@@ -13,8 +13,6 @@ namespace MtApi
|
||||
OrderSend = 1,
|
||||
OrderSendBuy = 1001,
|
||||
OrderSendSell = 1002,
|
||||
OrderSendBuyStoplossProfit = 10011,
|
||||
OrderSendSellStoplossProfit = 10012,
|
||||
OrderClose = 2,
|
||||
OrderCloseByCurrentPrice = 152,
|
||||
OrderCloseBy = 3,
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.21.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.21.0")]
|
||||
[assembly: AssemblyVersion("1.0.23.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.23.0")]
|
||||
|
||||
Reference in New Issue
Block a user