mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-18 05:08:11 +00:00
Updated test application (MT5) to perform testing function ChartWindowFind and ChartClose
This commit is contained in:
@@ -522,6 +522,8 @@
|
|||||||
<Button Command="{Binding ChartSaveTemplateCommand}" Content="ChartSaveTemplate" Margin="2"/>
|
<Button Command="{Binding ChartSaveTemplateCommand}" Content="ChartSaveTemplate" Margin="2"/>
|
||||||
<Button Command="{Binding ChartIdCommand}" Content="ChartId" Margin="2"/>
|
<Button Command="{Binding ChartIdCommand}" Content="ChartId" Margin="2"/>
|
||||||
<Button Command="{Binding ChartRedrawCommand}" Content="ChartRedraw" Margin="2"/>
|
<Button Command="{Binding ChartRedrawCommand}" Content="ChartRedraw" Margin="2"/>
|
||||||
|
<Button Command="{Binding ChartWindowFindCommand}" Content="ChartWindowFind" Margin="2"/>
|
||||||
|
<Button Command="{Binding ChartCloseCommand}" Content="ChartClose" Margin="2"/>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ namespace MtApi5TestClient
|
|||||||
public DelegateCommand ChartSaveTemplateCommand { get; private set; }
|
public DelegateCommand ChartSaveTemplateCommand { get; private set; }
|
||||||
public DelegateCommand ChartIdCommand { get; private set; }
|
public DelegateCommand ChartIdCommand { get; private set; }
|
||||||
public DelegateCommand ChartRedrawCommand { get; private set; }
|
public DelegateCommand ChartRedrawCommand { get; private set; }
|
||||||
|
public DelegateCommand ChartWindowFindCommand { get; private set; }
|
||||||
|
public DelegateCommand ChartCloseCommand { get; private set; }
|
||||||
|
|
||||||
public DelegateCommand TimeTradeServerCommand { get; private set; }
|
public DelegateCommand TimeTradeServerCommand { get; private set; }
|
||||||
public DelegateCommand TimeLocalCommand { get; private set; }
|
public DelegateCommand TimeLocalCommand { get; private set; }
|
||||||
@@ -319,6 +321,8 @@ namespace MtApi5TestClient
|
|||||||
ChartSaveTemplateCommand = new DelegateCommand(ExecuteChartSaveTemplate);
|
ChartSaveTemplateCommand = new DelegateCommand(ExecuteChartSaveTemplate);
|
||||||
ChartIdCommand = new DelegateCommand(ExecuteChartId);
|
ChartIdCommand = new DelegateCommand(ExecuteChartId);
|
||||||
ChartRedrawCommand = new DelegateCommand(ExecuteChartRedraw);
|
ChartRedrawCommand = new DelegateCommand(ExecuteChartRedraw);
|
||||||
|
ChartWindowFindCommand = new DelegateCommand(ExecuteChartWindowFind);
|
||||||
|
ChartCloseCommand = new DelegateCommand(ExecuteChartClose);
|
||||||
|
|
||||||
TimeCurrentCommand = new DelegateCommand(ExecuteTimeCurrent);
|
TimeCurrentCommand = new DelegateCommand(ExecuteTimeCurrent);
|
||||||
TimeTradeServerCommand = new DelegateCommand(ExecuteTimeTradeServer);
|
TimeTradeServerCommand = new DelegateCommand(ExecuteTimeTradeServer);
|
||||||
@@ -1221,6 +1225,21 @@ namespace MtApi5TestClient
|
|||||||
_mtApiClient.ChartRedraw(chartId);
|
_mtApiClient.ChartRedraw(chartId);
|
||||||
AddLog($"ChartRedraw: executed for chartid = {chartId}");
|
AddLog($"ChartRedraw: executed for chartid = {chartId}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void ExecuteChartWindowFind(object o)
|
||||||
|
{
|
||||||
|
const string shortname = "MACD(12,26,9)";
|
||||||
|
var chartId = ChartFunctionsChartIdValue;
|
||||||
|
var result = await Execute(() => _mtApiClient.ChartWindowFind(chartId, shortname));
|
||||||
|
AddLog($"ChartRedraw: result {result} for chartid = {chartId}");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ExecuteChartClose(object o)
|
||||||
|
{
|
||||||
|
var chartId = ChartFunctionsChartIdValue;
|
||||||
|
var result = await Execute(() => _mtApiClient.ChartClose(chartId));
|
||||||
|
AddLog($"ChartClose: result {result} for chartid = {chartId}");
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private static void RunOnUiThread(Action action)
|
private static void RunOnUiThread(Action action)
|
||||||
|
|||||||
Reference in New Issue
Block a user