Skip to content

Commit

Permalink
Issue #208: fixed issue with calling CheckOrders after starting Trade…
Browse files Browse the repository at this point in the history
…Monitor event MtApi has disconnected state
  • Loading branch information
vdemydiuk committed Oct 22, 2020
1 parent 373bfe4 commit 9eedf15
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion MtApi/Monitors/TradeMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ protected override void OnStart()
InitialCheck();
base.OnStart();
}
protected override void OnTriggerRaised() => Check();

protected override void OnTriggerRaised()
{
if (IsMtConnected)
Check();
}

private void Check()
{
try
Expand Down

0 comments on commit 9eedf15

Please sign in to comment.