1
- /*
1
+ /*
2
2
MIT LICENSE
3
3
4
4
Copyright 2017 Digital Ruby, LLC - http://www.digitalruby.com
@@ -119,9 +119,10 @@ public async Task ProcessHistoricalTrades()
119
119
{
120
120
if ( DirectionIsBackwards )
121
121
{
122
- // no trades found, move the whole block back
123
- endDateMoving = startDateMoving . Subtract ( BlockTime ) ;
124
- }
122
+ // no trades found, move the whole block back
123
+ endDateMoving = startDateMoving ;
124
+ startDateMoving = endDateMoving . Subtract ( BlockTime ) ;
125
+ }
125
126
else
126
127
{
127
128
// no trades found, move the whole block forward
@@ -188,7 +189,6 @@ public async Task ProcessHistoricalTrades()
188
189
break ;
189
190
}
190
191
}
191
- ClampDates ( ref startDateMoving , ref endDateMoving ) ;
192
192
await Task . Delay ( DelayMilliseconds ) ;
193
193
}
194
194
}
@@ -205,25 +205,6 @@ private void SetDates(out DateTime startDateMoving, out DateTime endDateMoving)
205
205
startDateMoving = StartDate . Value ;
206
206
endDateMoving = startDateMoving . Add ( BlockTime ) ;
207
207
}
208
- ClampDates ( ref startDateMoving , ref endDateMoving ) ;
209
- }
210
-
211
- private void ClampDates ( ref DateTime startDateMoving , ref DateTime endDateMoving )
212
- {
213
- if ( DirectionIsBackwards )
214
- {
215
- if ( startDateMoving < StartDate . Value )
216
- {
217
- startDateMoving = StartDate . Value ;
218
- }
219
- }
220
- else
221
- {
222
- if ( endDateMoving > EndDate . Value )
223
- {
224
- endDateMoving = EndDate . Value ;
225
- }
226
- }
227
208
}
228
209
}
229
210
}
0 commit comments