Bugfix in TimerTradeMonitor

SyncTrigger should only be set to true by default when the trigger will be initialized in the constructor.
This commit is contained in:
m.bochmann
2020-10-13 15:36:59 +02:00
parent a12ddba765
commit 739567d871
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -15,12 +15,11 @@ namespace MtApi.Monitors
public TimerTradeMonitor(MtApiClient apiClient)
: this(apiClient, new TimeElapsedTrigger(TimeSpan.FromSeconds(10)))
{
SyncTrigger = true; //Sync-Trigger set to true, to have the same behavior as before
}
public TimerTradeMonitor(MtApiClient apiClient, TimeElapsedTrigger timeElapsedTrigger)
: base(apiClient, timeElapsedTrigger)
{
SyncTrigger = true; //Sync-Trigger set to true, to have the same behavior as before
_timeElapsedTrigger = timeElapsedTrigger;
}
}
+1 -1
View File
@@ -77,7 +77,7 @@
<Compile Include="FlagFontStyle.cs" />
<Compile Include="Monitors\AvailabilityOrdersEventArgs.cs" />
<Compile Include="Monitors\MtMonitorBase.cs" />
<Compile Include="Monitors\Triggers\ITrigger.cs" />
<Compile Include="Monitors\Triggers\IMonitorTrigger.cs" />
<Compile Include="Monitors\Triggers\NewBarTrigger.cs" />
<Compile Include="Monitors\Triggers\TimeElapsedTrigger.cs" />
<Compile Include="MqlRates.cs" />