mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-07 16:07:53 +00:00
Issue #226: Implemented two modes of lock ticks: LOCK_EVERY_TICK and LOCK_EVERY_CANDLE. Added event OnLockTicks
This commit is contained in:
@@ -44,6 +44,7 @@ namespace TestApiClientUI
|
||||
_apiClient.ConnectionStateChanged += apiClient_ConnectionStateChanged;
|
||||
_apiClient.OnLastTimeBar += _apiClient_OnLastTimeBar;
|
||||
_apiClient.OnChartEvent += _apiClient_OnChartEvent;
|
||||
_apiClient.OnLockTicks += _apiClient_OnLockTicks;
|
||||
|
||||
InitOrderCommandsGroup();
|
||||
|
||||
@@ -149,6 +150,14 @@ namespace TestApiClientUI
|
||||
PrintLog(msg);
|
||||
}
|
||||
|
||||
private void _apiClient_OnLockTicks(object sender, MtLockTicksEventArgs e)
|
||||
{
|
||||
var msg =
|
||||
$"OnLockTicks: ExpertHandle = {e.ExpertHandle}, Symbol = {e.Symbol}";
|
||||
Console.WriteLine(msg);
|
||||
PrintLog(msg);
|
||||
}
|
||||
|
||||
private void apiClient_QuoteUpdated(object sender, string symbol, double bid, double ask)
|
||||
{
|
||||
Console.WriteLine(@"Quote: Symbol = {0}, Bid = {1}, Ask = {2}", symbol, bid, ask);
|
||||
|
||||
Reference in New Issue
Block a user