mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-13 18:58:09 +00:00
Issue #209: [MT5] Added function ChartId to get chart id by expert handle.
This commit is contained in:
@@ -542,6 +542,7 @@
|
||||
|
||||
<StackPanel Grid.Row="4" Orientation="Horizontal" Margin="5">
|
||||
<Button Command="{Binding ChartIdCommand}" Content="ChartId" Margin="2"/>
|
||||
<Button Command="{Binding ChartIdByExpertHandleCommand}" Content="ChartId by ExpertHandle" Margin="2"/>
|
||||
<TextBlock Text="ChartID" VerticalAlignment="Center" Margin="20,2,2,2"/>
|
||||
<TextBox Width="150" Text="{Binding ChartFunctionsChartIdValue}" Margin="2"/>
|
||||
</StackPanel>
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace MtApi5TestClient
|
||||
public DelegateCommand ChartApplyTemplateCommand { get; private set; }
|
||||
public DelegateCommand ChartSaveTemplateCommand { get; private set; }
|
||||
public DelegateCommand ChartIdCommand { get; private set; }
|
||||
public DelegateCommand ChartIdByExpertHandleCommand { get; private set; }
|
||||
public DelegateCommand ChartRedrawCommand { get; private set; }
|
||||
public DelegateCommand ChartWindowFindCommand { get; private set; }
|
||||
public DelegateCommand ChartCloseCommand { get; private set; }
|
||||
@@ -403,6 +404,7 @@ namespace MtApi5TestClient
|
||||
ChartApplyTemplateCommand = new DelegateCommand(ExecuteChartApplyTemplate);
|
||||
ChartSaveTemplateCommand = new DelegateCommand(ExecuteChartSaveTemplate);
|
||||
ChartIdCommand = new DelegateCommand(ExecuteChartId);
|
||||
ChartIdByExpertHandleCommand = new DelegateCommand(ExecuteChartIdByExpertHandle);
|
||||
ChartRedrawCommand = new DelegateCommand(ExecuteChartRedraw);
|
||||
ChartWindowFindCommand = new DelegateCommand(ExecuteChartWindowFind);
|
||||
ChartCloseCommand = new DelegateCommand(ExecuteChartClose);
|
||||
@@ -1514,6 +1516,22 @@ namespace MtApi5TestClient
|
||||
AddLog($"ChartId: chartid = {result}");
|
||||
}
|
||||
|
||||
private async void ExecuteChartIdByExpertHandle(object o)
|
||||
{
|
||||
if (SelectedQuote == null)
|
||||
{
|
||||
AddLog("Instrument is not selected.");
|
||||
return;
|
||||
}
|
||||
|
||||
var result = await Execute(() => _mtApiClient.ChartId(SelectedQuote.ExpertHandle));
|
||||
RunOnUiThread(() =>
|
||||
{
|
||||
ChartFunctionsChartIdValue = result;
|
||||
});
|
||||
AddLog($"ChartIdByExpertHandle: chartid = {result}");
|
||||
}
|
||||
|
||||
private void ExecuteChartRedraw(object o)
|
||||
{
|
||||
var chartId = ChartFunctionsChartIdValue;
|
||||
|
||||
Reference in New Issue
Block a user