mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-28 02:57:56 +00:00
692 lines
46 KiB
XML
Executable File
692 lines
46 KiB
XML
Executable File
<Window x:Class="MtApi5TestClient.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mtapi5="clr-namespace:MtApi5;assembly=MtApi5"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:mtApi5TestClient="clr-namespace:MtApi5TestClient"
|
|
Title="MainWindow" Height="700" Width="900"
|
|
Closing="Window_Closing">
|
|
<Window.Resources>
|
|
<DataTemplate x:Key="ConnectionTextBlockTemplate" DataType="{x:Type mtapi5:Mt5ConnectionState}">
|
|
<TextBlock Text="{Binding}" x:Name="PART_Text" />
|
|
<DataTemplate.Triggers>
|
|
<DataTrigger Binding="{Binding}" Value="Connected">
|
|
<Setter TargetName="PART_Text" Property="Text" Value="Connected" />
|
|
<Setter TargetName="PART_Text" Property="Foreground" Value="Green" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding}" Value="Connecting">
|
|
<Setter TargetName="PART_Text" Property="Text" Value="Connecting..." />
|
|
<Setter TargetName="PART_Text" Property="Foreground" Value="Gold" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding}" Value="Failed">
|
|
<Setter TargetName="PART_Text" Property="Text" Value="Connection Failed" />
|
|
<Setter TargetName="PART_Text" Property="Foreground" Value="Red" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding}" Value="Disconnected">
|
|
<Setter TargetName="PART_Text" Property="Text" Value="Disconnected" />
|
|
<Setter TargetName="PART_Text" Property="Foreground" Value="Black" />
|
|
</DataTrigger>
|
|
</DataTemplate.Triggers>
|
|
</DataTemplate>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_TRADE_REQUEST_ACTIONS_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_TRADE_REQUEST_ACTIONS"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_ORDER_TYPE_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_ORDER_TYPE"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_ORDER_TYPE_FILLING_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_ORDER_TYPE_FILLING"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_ORDER_TYPE_TIME_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_ORDER_TYPE_TIME"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_ACCOUNT_INFO_DOUBLE_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_ACCOUNT_INFO_DOUBLE"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_ACCOUNT_INFO_STRING_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_ACCOUNT_INFO_STRING"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_ACCOUNT_INFO_INTEGER_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_ACCOUNT_INFO_INTEGER"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_TERMINAL_INFO_INTEGER_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_TERMINAL_INFO_INTEGER"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_TERMINAL_INFO_STRING_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_TERMINAL_INFO_STRING"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_TERMINAL_INFO_DOUBLE_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_TERMINAL_INFO_DOUBLE"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
|
|
<ObjectDataProvider x:Key="ENUM_TIMEFRAMES_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_TIMEFRAMES"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
|
|
<ObjectDataProvider x:Key="ENUM_INDICATOR_Key" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="mtapi5:ENUM_INDICATOR"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
</Window.Resources>
|
|
|
|
<Grid x:Name="_MainLayout">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="0.65*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="0.35*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border Grid.Row="0" Margin="2" Visibility="Visible" BorderThickness="1" BorderBrush="DarkBlue">
|
|
<StackPanel>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="Host" Margin="5,2,2,2" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="0" Grid.Column="1" Margin="2" Text="{Binding Host, UpdateSourceTrigger=PropertyChanged}"/>
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="Port" Margin="5,2,2,2" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="1" Grid.Column="1" Margin="2" Width="70" HorizontalAlignment="Left" Text="{Binding Port, UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Grid>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,5,0,10" >
|
|
<Button Content="Connect" Width="70" Command="{Binding ConnectCommand}" />
|
|
<Button Margin="10,0,0,0" Width="70" Content="Disconnect" Command="{Binding DisconnectCommand}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border Grid.Row="3" Margin="2" Visibility="Visible" BorderThickness="1" BorderBrush="DarkBlue">
|
|
<Grid Margin="3">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Content="Quotes" Background="LightYellow" />
|
|
<ListView Grid.Row="1" Margin="2"
|
|
ItemsSource="{Binding Quotes}"
|
|
SelectedItem="{Binding SelectedQuote}"
|
|
SelectionMode="Single">
|
|
<ListView.View>
|
|
<GridView>
|
|
<GridViewColumn Width="100" Header="Instrument" DisplayMemberBinding="{Binding Instrument}" />
|
|
<GridViewColumn Width="70" Header="Bid" DisplayMemberBinding="{Binding Bid}" />
|
|
<GridViewColumn Width="70" Header="Ask" DisplayMemberBinding="{Binding Ask}" />
|
|
<GridViewColumn Width="80" Header="ExpertHandle" DisplayMemberBinding="{Binding ExpertHandle}" />
|
|
</GridView>
|
|
</ListView.View>
|
|
</ListView>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<TabControl Grid.Column="1" Margin="2">
|
|
<TabItem Header="Trade Functions">
|
|
<ScrollViewer>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Expander Header="MqlTradeRequest" Margin="10" IsExpanded="True">
|
|
<Grid Margin="0,10,0,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="0" Text="Action"/>
|
|
<ComboBox Grid.Column="1" Grid.Row="0" ItemsSource="{Binding Source={StaticResource ENUM_TRADE_REQUEST_ACTIONS_Key}}"
|
|
SelectedItem="{Binding TradeRequest.Action}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="0" Text="Magic" Margin="10,0,0,0"/>
|
|
<TextBox Grid.Column="3" Grid.Row="0" Text="{Binding TradeRequest.Magic}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="1" Text="Order"/>
|
|
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding TradeRequest.Order}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="1" Text="Symbol" Margin="10,0,0,0"/>
|
|
<TextBox Grid.Column="3" Grid.Row="1" Text="{Binding TradeRequest.Symbol}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="2" Text="Volume"/>
|
|
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding TradeRequest.Volume}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="2" Text="Price" Margin="10,0,0,0"/>
|
|
<TextBox Grid.Column="3" Grid.Row="2" Text="{Binding TradeRequest.Price}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="3" Text="Stoplimit"/>
|
|
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding TradeRequest.Stoplimit}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="3" Text="Sl" Margin="10,0,0,0"/>
|
|
<TextBox Grid.Column="3" Grid.Row="3" Text="{Binding TradeRequest.Sl}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="4" Text="Tp"/>
|
|
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding TradeRequest.Tp}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="4" Text="Deviation" Margin="10,0,0,0"/>
|
|
<TextBox Grid.Column="3" Grid.Row="4" Text="{Binding TradeRequest.Deviation}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="5" Text="Type"/>
|
|
<ComboBox Grid.Column="1" Grid.Row="5" ItemsSource="{Binding Source={StaticResource ENUM_ORDER_TYPE_Key}}"
|
|
SelectedItem="{Binding TradeRequest.Type}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="5" Text="Type_filling" Margin="10,0,0,0"/>
|
|
<ComboBox Grid.Column="3" Grid.Row="5" ItemsSource="{Binding Source={StaticResource ENUM_ORDER_TYPE_FILLING_Key}}"
|
|
SelectedItem="{Binding TradeRequest.Type_filling}" Margin="5,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="6" Text="Type_time"/>
|
|
<ComboBox Grid.Column="1" Grid.Row="6" ItemsSource="{Binding Source={StaticResource ENUM_ORDER_TYPE_TIME_Key}}"
|
|
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.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.Comment}" Margin="5,0,0,0"/>
|
|
</Grid>
|
|
</Expander>
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Vertical">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Content="OrderSend" Command="{Binding OrderSendCommand}" Width="100" Height="25" HorizontalAlignment="Left" Margin="4"/>
|
|
<Button Content="OrderCheck" Command="{Binding OrderCheckCommand}" Width="100" Height="25" HorizontalAlignment="Left" Margin="4"/>
|
|
<Button Content="PositionGetTicket" Command="{Binding PositionGetTicketCommand}" Width="100" Height="25" HorizontalAlignment="Left" Margin="4"/>
|
|
</StackPanel>
|
|
|
|
<WrapPanel>
|
|
<Button Content="HistoryDealGetDouble" Command="{Binding HistoryDealGetDoubleCommand}" Height="25" HorizontalAlignment="Left" Margin="4"/>
|
|
<Button Content="HistoryDealGetInteger" Command="{Binding HistoryDealGetIntegerCommand}" Height="25" HorizontalAlignment="Left" Margin="4"/>
|
|
<Button Content="HistoryDealGetString" Command="{Binding HistoryDealGetStringCommand}" Height="25" HorizontalAlignment="Left" Margin="4"/>
|
|
<Button Content="HistoryOrderGetInteger" Command="{Binding HistoryOrderGetIntegerCommand}" Height="25" HorizontalAlignment="Left" Margin="4"/>
|
|
<Button Content="HistoryDealMethods" Command="{Binding HistoryDealMethodsCommand}" Height="25" HorizontalAlignment="Left" Margin="4"/>
|
|
</WrapPanel>
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
<TabItem Header="Account Information">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0" Margin="10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.4*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<ComboBox Grid.Column="0" Grid.Row="0"
|
|
SelectedItem="{Binding AccountInfoDoublePropertyId}"
|
|
ItemsSource="{Binding Source={StaticResource ENUM_ACCOUNT_INFO_DOUBLE_Key}}"/>
|
|
<Button Grid.Column="1" Grid.Row="0" Margin="10,0,0,0"
|
|
Command="{Binding AccountInfoDoubleCommand}"
|
|
Content="AccountInfoDouble" HorizontalAlignment="Left" />
|
|
|
|
<ComboBox Grid.Column="0" Grid.Row="1"
|
|
SelectedItem="{Binding AccountInfoIntegerPropertyId}"
|
|
ItemsSource="{Binding Source={StaticResource ENUM_ACCOUNT_INFO_INTEGER_Key}}"/>
|
|
<Button Grid.Column="1" Grid.Row="1" Margin="10,0,0,0"
|
|
Command="{Binding AccountInfoIntegerCommand}"
|
|
Content="AccountInfoInteger" HorizontalAlignment="Left" />
|
|
|
|
<ComboBox Grid.Column="0" Grid.Row="2"
|
|
SelectedItem="{Binding AccountInfoStringPropertyId}"
|
|
ItemsSource="{Binding Source={StaticResource ENUM_ACCOUNT_INFO_STRING_Key}}"/>
|
|
<Button Grid.Column="1" Grid.Row="2" Margin="10,0,0,0"
|
|
Command="{Binding AccountInfoStringCommand}"
|
|
Content="AccountInfoString" HorizontalAlignment="Left" />
|
|
</Grid>
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<TabItem Header="Terminal Information">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0" Margin="10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.4*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<ComboBox Grid.Column="0" Grid.Row="0"
|
|
SelectedItem="{Binding TerminalInfoDoublePropertyId}"
|
|
ItemsSource="{Binding Source={StaticResource ENUM_TERMINAL_INFO_DOUBLE_Key}}"/>
|
|
<Button Grid.Column="1" Grid.Row="0" Margin="10,0,0,0"
|
|
Command="{Binding TerminalInfoDoubleCommand}"
|
|
Content="TerminalInfoDouble" HorizontalAlignment="Left" />
|
|
|
|
<ComboBox Grid.Column="0" Grid.Row="1"
|
|
SelectedItem="{Binding TerminalInfoIntegerPropertyId}"
|
|
ItemsSource="{Binding Source={StaticResource ENUM_TERMINAL_INFO_INTEGER_Key}}"/>
|
|
<Button Grid.Column="1" Grid.Row="1" Margin="10,0,0,0"
|
|
Command="{Binding TerminalInfoIntegerCommand}"
|
|
Content="TerminalInfoInteger" HorizontalAlignment="Left" />
|
|
|
|
<ComboBox Grid.Column="0" Grid.Row="2"
|
|
SelectedItem="{Binding TerminalInfoStringPropertyId}"
|
|
ItemsSource="{Binding Source={StaticResource ENUM_TERMINAL_INFO_STRING_Key}}"/>
|
|
<Button Grid.Column="1" Grid.Row="2" Margin="10,0,0,0"
|
|
Command="{Binding TerminalInfoStringCommand}"
|
|
Content="TerminalInfoString" HorizontalAlignment="Left" />
|
|
</Grid>
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="Timeseries and Indicators Access">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Grid.Column="1" Margin="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="0" Text="Symbol Name" Margin="1"/>
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="TimeFrame" Margin="1" HorizontalAlignment="Right"/>
|
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="StartPos" Margin="1" HorizontalAlignment="Right"/>
|
|
<TextBlock Grid.Row="3" Grid.Column="0" Text="Count" Margin="1" HorizontalAlignment="Right"/>
|
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TimeSeriesValues.SymbolValue}" Margin="1"/>
|
|
<ComboBox Grid.Row="1" Grid.Column="1" Margin="1"
|
|
ItemsSource="{Binding Source={StaticResource ENUM_TIMEFRAMES_Key}}"
|
|
SelectedItem="{Binding TimeSeriesValues.TimeFrame}"/>
|
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding TimeSeriesValues.StartPos}" Margin="1"/>
|
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding TimeSeriesValues.Count}" Margin="1"/>
|
|
</Grid>
|
|
|
|
<WrapPanel Grid.Row="1" Grid.Column="0" Margin="5">
|
|
<Button Command="{Binding CopyRatesCommand}" Margin="1"
|
|
Content="CopyRates" HorizontalAlignment="Left" />
|
|
<Button Command="{Binding CopyTimesCommand}" Margin="1"
|
|
Content="CopyTimes" HorizontalAlignment="Left" />
|
|
<Button Command="{Binding CopyOpenCommand}" Margin="1"
|
|
Content="CopyOpen" HorizontalAlignment="Left" />
|
|
<Button Command="{Binding CopyHighCommand}" Margin="1"
|
|
Content="CopyHigh" HorizontalAlignment="Left" />
|
|
<Button Command="{Binding CopyLowCommand}" Margin="1"
|
|
Content="CopyLow" HorizontalAlignment="Left" />
|
|
<Button Command="{Binding CopyCloseCommand}" Margin="1"
|
|
Content="CopyClose" HorizontalAlignment="Left" />
|
|
<Button Command="{Binding CopyTickVolumeCommand}" Margin="1"
|
|
Content="CopyTickVolume" HorizontalAlignment="Left" />
|
|
<Button Command="{Binding CopyRealVolumeCommand}" Margin="1"
|
|
Content="CopyRealVolume" HorizontalAlignment="Left" />
|
|
<Button Command="{Binding CopySpreadCommand}" Margin="1"
|
|
Content="CopySpread" HorizontalAlignment="Left" />
|
|
<Button Command="{Binding CopyTicksCommand}" Margin="1"
|
|
Content="CopyTicks" HorizontalAlignment="Left" />
|
|
</WrapPanel>
|
|
|
|
<Grid Grid.Row="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<DockPanel Grid.Row="0" LastChildFill="True">
|
|
<Button DockPanel.Dock="Right" Command="{Binding IndicatorCreateCommand}" Margin="2"
|
|
Content="IndicatorCreate" HorizontalAlignment="Left" />
|
|
<ComboBox Margin="2"
|
|
ItemsSource="{Binding Source={StaticResource ENUM_INDICATOR_Key}}"
|
|
SelectedItem="{Binding TimeSeriesValues.IndicatorType}"/>
|
|
</DockPanel>
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
|
<Label Content="Indicator handle:" Margin="2"/>
|
|
<TextBox Margin="2" Width="60" PreviewTextInput="NumberValidationTextBox" Text="{Binding TimeSeriesValues.IndicatorHandle}"/>
|
|
<Button Command="{Binding IndicatorReleaseCommand}" Margin="2"
|
|
Content="IndicatorRelease" HorizontalAlignment="Left" />
|
|
</StackPanel>
|
|
<WrapPanel Grid.Row="2" Margin="2">
|
|
<Button Command="{Binding iCustomCommand}" Content="iCustom" Margin="2"/>
|
|
<Button Command="{Binding iBullsPowerCommand}" Content="iBullPower" Margin="2"/>
|
|
<Button Command="{Binding iBearsPowerCommand}" Content="iBearPower" Margin="2"/>
|
|
</WrapPanel>
|
|
<WrapPanel Grid.Row="3">
|
|
<Button Command="{Binding BarsCalculatedCommand}" Content="BarsCalculated" Margin="2"/>
|
|
<Button Command="{Binding CopyBufferCommand}" Content="CopyBuffer" Margin="2"/>
|
|
</WrapPanel>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<ListBox Grid.Column="0" ItemsSource="{Binding TimeSeriesResults}" />
|
|
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<TabItem Header="Market Info">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<WrapPanel Grid.Row="0" VerticalAlignment="Top" Margin="5">
|
|
<Button Command="{Binding SymbolsTotalCommand}" Content="SymbolsTotal" Margin="2"/>
|
|
<Button Command="{Binding SymbolNameCommand}" Content="SymbolName" Margin="2"/>
|
|
<Button Command="{Binding SymbolSelectCommand}" Content="SymbolSelect" Margin="2"/>
|
|
<Button Command="{Binding SymbolIsSynchronizedCommand}" Content="SymbolIsSynchronized" Margin="2"/>
|
|
<Button Command="{Binding SymbolInfoDoubleCommand}" Content="SymbolInfoDouble" Margin="2"/>
|
|
<Button Command="{Binding SymbolInfoIntegerCommand}" Content="SymbolInfoInteger" Margin="2"/>
|
|
<Button Command="{Binding SymbolInfoStringCommand}" Content="SymbolInfoString" Margin="2"/>
|
|
<Button Command="{Binding SymbolInfoString2Command}" Content="SymbolInfoString-2" Margin="2"/>
|
|
<Button Command="{Binding SymbolInfoTickCommand}" Content="SymbolInfoTick" Margin="2"/>
|
|
<Button Command="{Binding SymbolInfoSessionQuoteCommand}" Content="SymbolInfoSessionQuote" Margin="2"/>
|
|
<Button Command="{Binding SymbolInfoSessionTradeCommand}" Content="SymbolInfoSessionTrade" Margin="2"/>
|
|
<Button Command="{Binding MarketBookAddCommand}" Content="MarketBookAdd" Margin="2"/>
|
|
<Button Command="{Binding MarketBookReleaseCommand}" Content="MarketBookRelease" Margin="2"/>
|
|
<Button Command="{Binding MarketBookGetCommand}" Content="MarketBookGet" Margin="2"/>
|
|
</WrapPanel>
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
|
<Button Content="GetSymbols" Command="{Binding GetSymbolsCommand}" Width="100" Margin="2"/>
|
|
<CheckBox Content="Selected" IsChecked="{Binding GetSymbolsSelected}" Margin="5" />
|
|
</StackPanel>
|
|
<ListBox Grid.Row="2" ItemsSource="{Binding Symbols}" Height="Auto" Width="200" HorizontalAlignment="Left"/>
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<TabItem Header="CTrade (Positions)">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Button Grid.Row="0" Command="{Binding PositionOpenCommand}" Content="PositionOpen" Margin="2" HorizontalAlignment="Left"/>
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="4">
|
|
<TextBlock Text="Ticket:" VerticalAlignment="Center"/>
|
|
<TextBox Text="{Binding PositionTicketValue}" Width="150" Margin="2"/>
|
|
<Button Command="{Binding PositionCloseCommand}" Content="PositionClose" Margin="2"/>
|
|
</StackPanel>
|
|
<Button Grid.Row="2" Command="{Binding PositionCloseAllCommand}" Content="PositionCloseAll" Margin="2" HorizontalAlignment="Left"/>
|
|
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="4">
|
|
<Button Command="{Binding BuyCommand}" Content="Buy" Width="60" Margin="2" HorizontalAlignment="Left"/>
|
|
<Button Command="{Binding SellCommand}" Content="Sell" Width="60" Margin="2" HorizontalAlignment="Left"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<TabItem Header="Chart Functions">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<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">
|
|
<TextBlock Text="Symbol" VerticalAlignment="Center" Margin="2"/>
|
|
<TextBox Width="100" Text="{Binding ChartFunctionsSymbolValue}" Margin="2"/>
|
|
</StackPanel>
|
|
|
|
<WrapPanel Grid.Row="1" Orientation="Horizontal" Margin="5">
|
|
<Button Command="{Binding ChartOpenCommand}" Content="ChartOpen" Margin="2"/>
|
|
<Button Command="{Binding ChartTimePriceToXYCommand}" Content="ChartTimePriceToXY" Margin="2"/>
|
|
<Button Command="{Binding ChartXYToTimePriceCommand}" Content="ChartXYToTimePrice" Margin="2"/>
|
|
</WrapPanel>
|
|
|
|
<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"/>
|
|
<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>
|
|
|
|
<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"/>
|
|
<Button Command="{Binding ChartSetIntegerCommand}" Content="ChartSetInteger" Margin="2"/>
|
|
<Button Command="{Binding ChartSetStringCommand}" Content="ChartSetString" Margin="2"/>
|
|
<Button Command="{Binding ChartGetDoubleCommand}" Content="ChartGetDouble" Margin="2"/>
|
|
<Button Command="{Binding ChartGetIntegerCommand}" Content="ChartGetInteger" Margin="2"/>
|
|
<Button Command="{Binding ChartNavigateCommand}" Content="ChartNavigate" Margin="2"/>
|
|
<Button Command="{Binding ChartIndicatorAddCommand}" Content="ChartIndicatorAdd" Margin="2"/>
|
|
<Button Command="{Binding ChartIndicatorDeleteCommand}" Content="ChartIndicatorDelete" Margin="2"/>
|
|
<Button Command="{Binding ChartIndicatorGetCommand}" Content="ChartIndicatorGet" Margin="2"/>
|
|
<Button Command="{Binding ChartIndicatorNameCommand}" Content="ChartIndicatorName" Margin="2"/>
|
|
<Button Command="{Binding ChartIndicatorsTotalCommand}" Content="ChartIndicatorsTotal" Margin="2"/>
|
|
<Button Command="{Binding ChartWindowOnDroppedCommand}" Content="ChartWindowOnDropped" Margin="2"/>
|
|
<Button Command="{Binding ChartPriceOnDroppedCommand}" Content="ChartPriceOnDropped" Margin="2"/>
|
|
<Button Command="{Binding ChartTimeOnDroppedCommand}" Content="ChartTimeOnDropped" Margin="2"/>
|
|
<Button Command="{Binding ChartXOnDroppedCommand}" Content="ChartXOnDropped" Margin="2"/>
|
|
<Button Command="{Binding ChartYOnDroppedCommand}" Content="ChartYOnDropped" Margin="2"/>
|
|
<Button Command="{Binding ChartSetSymbolPeriodCommand}" Content="ChartSetSymbolPeriod" Margin="2"/>
|
|
<Button Command="{Binding ChartScreenShotCommand}" Content="ChartScreenShot" Margin="2"/>
|
|
</WrapPanel>
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="Time and Date">
|
|
<WrapPanel VerticalAlignment="Top" Margin="5">
|
|
<Button Command="{Binding TimeCurrentCommand}" Content="TimeCurrent" Margin="2"/>
|
|
<Button Command="{Binding TimeTradeServerCommand}" Content="TimeTradeServer" Margin="2"/>
|
|
<Button Command="{Binding TimeLocalCommand}" Content="TimeLocal" Margin="2"/>
|
|
<Button Command="{Binding TimeGMTCommand}" Content="TimeGMT" Margin="2"/>
|
|
</WrapPanel>
|
|
</TabItem>
|
|
|
|
<TabItem Header="Checkup and Common Functions">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<WrapPanel VerticalAlignment="Top" Margin="5">
|
|
<Button Command="{Binding GetLastErrorCommand}" Content="GetLastError" Margin="2"/>
|
|
<Button Command="{Binding ResetLastErrorCommand}" Content="ResetLastError" Margin="2"/>
|
|
<Button Command="{Binding TesterStopCommand}" Content="TesterStop" Margin="2"/>
|
|
</WrapPanel>
|
|
|
|
<Button Grid.Row="1" Content="UnlockTicks" HorizontalAlignment="Left" Margin="5" Command="{Binding UnlockTicksCommand}"/>
|
|
|
|
<Grid Margin="10" Grid.Row="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<TextBox Grid.Row="0" Text="{Binding MessageText}" Margin="2"/>
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button Command="{Binding PrintCommand}" Content="Print" Margin="2" />
|
|
<Button Command="{Binding AlertCommand}" Content="Alert" Margin="2" />
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<TabItem Header="Global Variables">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Grid.Column="0" Grid.Row="0" Text="Global Variable Name" Margin="2,0,0,0"/>
|
|
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding GlobalVarName}" Margin="4,0,0,0"/>
|
|
<TextBlock Grid.Column="0" Grid.Row="1" Text="Global Variable Value" Margin="2,2,0,0"/>
|
|
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding GlobalVarValue}" Margin="4,2,0,0"/>
|
|
</Grid>
|
|
<WrapPanel VerticalAlignment="Top" Grid.Row="1" Margin="0,5,0,0">
|
|
<Button Command="{Binding GlobalVariableCheckCommand}" Content="GlobalVariableCheck" Margin="2"/>
|
|
<Button Command="{Binding GlobalVariableTimeCommand}" Content="GlobalVariableTime" Margin="2"/>
|
|
<Button Command="{Binding GlobalVariableDelCommand}" Content="GlobalVariableDel" Margin="2"/>
|
|
<Button Command="{Binding GlobalVariableGetCommand}" Content="GlobalVariableGet" Margin="2"/>
|
|
<Button Command="{Binding GlobalVariableNameCommand}" Content="GlobalVariableName" Margin="2"/>
|
|
<Button Command="{Binding GlobalVariableSetCommand}" Content="GlobalVariableSet" Margin="2"/>
|
|
<Button Command="{Binding GlobalVariablesFlushCommand}" Content="GlobalVariablesFlush" Margin="2"/>
|
|
<Button Command="{Binding GlobalVariableTempCommand}" Content="GlobalVariableTemp" Margin="2"/>
|
|
<Button Command="{Binding GlobalVariableSetOnConditionCommand}" Content="GlobalVariableSetOnCondition" Margin="2"/>
|
|
<Button Command="{Binding GlobalVariablesDeleteAllCommand}" Content="GlobalVariablesDeleteAll" Margin="2"/>
|
|
<Button Command="{Binding GlobalVariablesTotalCommand}" Content="GlobalVariablesTotal" Margin="2"/>
|
|
</WrapPanel>
|
|
</Grid>
|
|
</TabItem>
|
|
</TabControl>
|
|
|
|
</Grid>
|
|
|
|
<GridSplitter Grid.Row="1" Height="2" HorizontalAlignment="Stretch" />
|
|
|
|
<Border Grid.Row="2" BorderThickness="1" BorderBrush="DarkBlue" Margin="2">
|
|
<Grid Margin="3">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Content="Output Console" Background="LightYellow" />
|
|
<ListBox Grid.Row="1" ItemsSource="{Binding History}"
|
|
mtApi5TestClient:ListBoxBehavior.ScrollOnNewItem="true" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<StatusBar Grid.Row="3">
|
|
<StatusBarItem>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Label Content="{Binding ConnectionState}"
|
|
ToolTip="{Binding ConnectionMessage}"
|
|
ContentTemplate="{StaticResource ConnectionTextBlockTemplate}"/>
|
|
</StackPanel>
|
|
</StatusBarItem>
|
|
</StatusBar>
|
|
</Grid>
|
|
</Window>
|