Issue #82: Disabled debug mode in MtApi5.ex5. Updated test client to send order with values Expiration and Comment

This commit is contained in:
vdemydiuk
2018-02-18 20:24:27 +02:00
parent 0e5bb40a6f
commit 521d7ea2c0
5 changed files with 7 additions and 16 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
//NoCommand = 0
//trade operations
OrderSend = 1,
//OrderSend = 1,
OrderCalcMargin = 2,
OrderCalcProfit = 3,
OrderCheck = 4,
+1 -10
View File
@@ -123,15 +123,6 @@ namespace MtApi5
result = response?.Value?.TradeResult;
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>
@@ -205,7 +196,7 @@ namespace MtApi5
var commandParameters = request.ToArrayList();
var strResult = SendCommand<string>(Mt5CommandType.OrderSend, commandParameters);
var strResult = SendCommand<string>(Mt5CommandType.OrderCheck, commandParameters);
return strResult.ParseResult(ParamSeparator, out result);
}
+2 -2
View File
@@ -247,10 +247,10 @@
SelectedItem="{Binding TradeRequest.Type_time}" Margin="5,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"/>
<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>
</Expander>
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -39,7 +39,7 @@
bool getBooleanValue(int expertHandle, int paramIndex, bool& res, string& err);
#import
#define __DEBUG_LOG__
//#define __DEBUG_LOG__
input int Port = 8228;
@@ -5833,8 +5833,8 @@ bool JsonToMqlTradeRequest(JSONObject *jo, MqlTradeRequest& request)
CHECK_JSON_VALUE(jo, "Type_time", false);
request.type_time = (ENUM_ORDER_TYPE_TIME)jo.getInt("Type_time");
//Expiration
CHECK_JSON_VALUE(jo, "Expiration", false);
//MtExpiration
CHECK_JSON_VALUE(jo, "MtExpiration", false);
request.expiration = (datetime)jo.getInt("MtExpiration");
//Comment