Closed lli839 closed 3 months ago
If you want to react more frequently, you can decrease the elapsed interval or use the wait_next_feed
method. In any case, I believe a strategy should be validated through backtesting first. The strategy should exhibit the same behavior as it did during backtesting and vice-versa.
If you want to react more frequently, you can decrease the elapsed interval or use the
wait_next_feed
method. In any case, I believe a strategy should be validated through backtesting first. The strategy should exhibit the same behavior as it did during backtesting and vice-versa.
That makes sense. Appreciate your reply.
hi,
hbt.elapse(100_000_000)
is used in both backtesting and live trading code samples. My understanding of hbt.elapse() is to accumulate events happening during that time window(100ms in above case), then make trade decision based on the latest time window's data.My original hunch is that it's fine for backtesting. However, I guess we should not use it in live trading code since many things happening during that time window. Maybe a more practical way is to actively react to each event received through TCP connection?
Moreover, do you have a discord channel?