Login
Login

Reply To: news in AlgoQuant

#5113
kenyiu
Participant

1. You are right. The simple way to do trading within a period of time each day is using Timers. The timers are in fact part of your strategy logic.

2. That depends on your strategy requirements. If a single price mimicking both bid and ask does not matter, you could use
new Depth(product, price, price)
or just
new Depth(product, price)
which will give you a Depth instance with both bid and ask of the same value. In fact, StockEOD from Yahoo give only one close price (no bid/ask), and the code creates the corresponding Depth instance with new Depth(product, price).

However, if your strategy treats bid and ask differently, the presence of bid/ask before the strategy making decision must be checked.