mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-27 18:47:55 +00:00
Updated test application (MT5) to perform testing function ChartPeriod and ChartSetDouble
This commit is contained in:
@@ -499,6 +499,8 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="5">
|
||||
@@ -512,18 +514,23 @@
|
||||
<Button Command="{Binding ChartXYToTimePriceCommand}" Content="ChartXYToTimePrice" Margin="2"/>
|
||||
</WrapPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="ChartID" VerticalAlignment="Center" Margin="2"/>
|
||||
<TextBox Width="150" Text="{Binding ChartFunctionsChartIdValue}" Margin="2"/>
|
||||
</StackPanel>
|
||||
|
||||
<WrapPanel Grid.Row="3" VerticalAlignment="Top" Margin="5">
|
||||
<Button Command="{Binding ChartApplyTemplateCommand}" Content="ChartApplyTemplate" Margin="2"/>
|
||||
<Button Command="{Binding ChartSaveTemplateCommand}" Content="ChartSaveTemplate" Margin="2"/>
|
||||
</WrapPanel>
|
||||
|
||||
<StackPanel Grid.Row="4" Orientation="Horizontal" Margin="5">
|
||||
<Button Command="{Binding ChartIdCommand}" Content="ChartId" Margin="2"/>
|
||||
<TextBlock Text="ChartID" VerticalAlignment="Center" Margin="20,2,2,2"/>
|
||||
<TextBox Width="150" Text="{Binding ChartFunctionsChartIdValue}" Margin="2"/>
|
||||
</StackPanel>
|
||||
|
||||
<WrapPanel Grid.Row="5" VerticalAlignment="Top" Margin="5">
|
||||
<Button Command="{Binding ChartRedrawCommand}" Content="ChartRedraw" Margin="2"/>
|
||||
<Button Command="{Binding ChartWindowFindCommand}" Content="ChartWindowFind" Margin="2"/>
|
||||
<Button Command="{Binding ChartCloseCommand}" Content="ChartClose" Margin="2"/>
|
||||
<Button Command="{Binding ChartPeriodCommand}" Content="ChartPeriod" Margin="2"/>
|
||||
<Button Command="{Binding ChartSetDoubleCommand}" Content="ChartSetDouble" Margin="2"/>
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
@@ -85,6 +85,8 @@ namespace MtApi5TestClient
|
||||
public DelegateCommand ChartRedrawCommand { get; private set; }
|
||||
public DelegateCommand ChartWindowFindCommand { get; private set; }
|
||||
public DelegateCommand ChartCloseCommand { get; private set; }
|
||||
public DelegateCommand ChartPeriodCommand { get; private set; }
|
||||
public DelegateCommand ChartSetDoubleCommand { get; private set; }
|
||||
|
||||
public DelegateCommand TimeTradeServerCommand { get; private set; }
|
||||
public DelegateCommand TimeLocalCommand { get; private set; }
|
||||
@@ -323,6 +325,8 @@ namespace MtApi5TestClient
|
||||
ChartRedrawCommand = new DelegateCommand(ExecuteChartRedraw);
|
||||
ChartWindowFindCommand = new DelegateCommand(ExecuteChartWindowFind);
|
||||
ChartCloseCommand = new DelegateCommand(ExecuteChartClose);
|
||||
ChartPeriodCommand = new DelegateCommand(ExecuteChartPeriod);
|
||||
ChartSetDoubleCommand = new DelegateCommand(ExecuteChartSetDouble);
|
||||
|
||||
TimeCurrentCommand = new DelegateCommand(ExecuteTimeCurrent);
|
||||
TimeTradeServerCommand = new DelegateCommand(ExecuteTimeTradeServer);
|
||||
@@ -1240,6 +1244,20 @@ namespace MtApi5TestClient
|
||||
var result = await Execute(() => _mtApiClient.ChartClose(chartId));
|
||||
AddLog($"ChartClose: result {result} for chartid = {chartId}");
|
||||
}
|
||||
|
||||
private async void ExecuteChartPeriod(object o)
|
||||
{
|
||||
var chartId = ChartFunctionsChartIdValue;
|
||||
var result = await Execute(() => _mtApiClient.ChartPeriod(chartId));
|
||||
AddLog($"ChartPeriod: result {result} for chartid = {chartId}");
|
||||
}
|
||||
|
||||
private async void ExecuteChartSetDouble(object o)
|
||||
{
|
||||
var chartId = ChartFunctionsChartIdValue;
|
||||
var result = await Execute(() => _mtApiClient.ChartSetDouble(chartId, ENUM_CHART_PROPERTY_DOUBLE.CHART_PRICE_MAX, 1.13));
|
||||
AddLog($"ChartSetDouble: result {result} for chartid = {chartId}");
|
||||
}
|
||||
#endregion
|
||||
|
||||
private static void RunOnUiThread(Action action)
|
||||
|
||||
Reference in New Issue
Block a user