mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-15 03:38:09 +00:00
Issue #82: Disabled debug mode in MtApi5.ex5. Updated test client to send order with values Expiration and Comment
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
//NoCommand = 0
|
//NoCommand = 0
|
||||||
|
|
||||||
//trade operations
|
//trade operations
|
||||||
OrderSend = 1,
|
//OrderSend = 1,
|
||||||
OrderCalcMargin = 2,
|
OrderCalcMargin = 2,
|
||||||
OrderCalcProfit = 3,
|
OrderCalcProfit = 3,
|
||||||
OrderCheck = 4,
|
OrderCheck = 4,
|
||||||
|
|||||||
+1
-10
@@ -123,15 +123,6 @@ namespace MtApi5
|
|||||||
|
|
||||||
result = response?.Value?.TradeResult;
|
result = response?.Value?.TradeResult;
|
||||||
return response?.Value != null && response.Value.RetVal;
|
return response?.Value != null && response.Value.RetVal;
|
||||||
|
|
||||||
|
|
||||||
//var commandParameters = request.ToArrayList();
|
|
||||||
|
|
||||||
//var strResult = SendCommand<string>(Mt5CommandType.OrderSend, commandParameters);
|
|
||||||
|
|
||||||
//Log.Debug($"OrderSend: strResult = {strResult}");
|
|
||||||
|
|
||||||
//return strResult.ParseResult(ParamSeparator, out result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///<summary>
|
///<summary>
|
||||||
@@ -205,7 +196,7 @@ namespace MtApi5
|
|||||||
|
|
||||||
var commandParameters = request.ToArrayList();
|
var commandParameters = request.ToArrayList();
|
||||||
|
|
||||||
var strResult = SendCommand<string>(Mt5CommandType.OrderSend, commandParameters);
|
var strResult = SendCommand<string>(Mt5CommandType.OrderCheck, commandParameters);
|
||||||
|
|
||||||
return strResult.ParseResult(ParamSeparator, out result);
|
return strResult.ParseResult(ParamSeparator, out result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -247,10 +247,10 @@
|
|||||||
SelectedItem="{Binding TradeRequest.Type_time}" Margin="5,0,0,0"/>
|
SelectedItem="{Binding TradeRequest.Type_time}" Margin="5,0,0,0"/>
|
||||||
|
|
||||||
<TextBlock Grid.Column="2" Grid.Row="6" Text="Expiration" Margin="10,0,0,0"/>
|
<TextBlock Grid.Column="2" Grid.Row="6" Text="Expiration" Margin="10,0,0,0"/>
|
||||||
<TextBox Grid.Column="3" Grid.Row="6" Text="{Binding TradeRequest}" Margin="5,0,0,0"/>
|
<TextBox Grid.Column="3" Grid.Row="6" Text="{Binding TradeRequest.Expiration}" Margin="5,0,0,0"/>
|
||||||
|
|
||||||
<TextBlock Grid.Column="0" Grid.Row="7" Text="Comment"/>
|
<TextBlock Grid.Column="0" Grid.Row="7" Text="Comment"/>
|
||||||
<TextBox Grid.Column="1" Grid.Row="7" Grid.ColumnSpan="3" Text="{Binding TradeRequest}" Margin="5,0,0,0"/>
|
<TextBox Grid.Column="1" Grid.Row="7" Grid.ColumnSpan="3" Text="{Binding TradeRequest.Comment}" Margin="5,0,0,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Expander>
|
</Expander>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
+3
-3
@@ -39,7 +39,7 @@
|
|||||||
bool getBooleanValue(int expertHandle, int paramIndex, bool& res, string& err);
|
bool getBooleanValue(int expertHandle, int paramIndex, bool& res, string& err);
|
||||||
#import
|
#import
|
||||||
|
|
||||||
#define __DEBUG_LOG__
|
//#define __DEBUG_LOG__
|
||||||
|
|
||||||
input int Port = 8228;
|
input int Port = 8228;
|
||||||
|
|
||||||
@@ -5833,8 +5833,8 @@ bool JsonToMqlTradeRequest(JSONObject *jo, MqlTradeRequest& request)
|
|||||||
CHECK_JSON_VALUE(jo, "Type_time", false);
|
CHECK_JSON_VALUE(jo, "Type_time", false);
|
||||||
request.type_time = (ENUM_ORDER_TYPE_TIME)jo.getInt("Type_time");
|
request.type_time = (ENUM_ORDER_TYPE_TIME)jo.getInt("Type_time");
|
||||||
|
|
||||||
//Expiration
|
//MtExpiration
|
||||||
CHECK_JSON_VALUE(jo, "Expiration", false);
|
CHECK_JSON_VALUE(jo, "MtExpiration", false);
|
||||||
request.expiration = (datetime)jo.getInt("MtExpiration");
|
request.expiration = (datetime)jo.getInt("MtExpiration");
|
||||||
|
|
||||||
//Comment
|
//Comment
|
||||||
|
|||||||
Reference in New Issue
Block a user