Thanks, I'll take a shot at extending the datafeed
Posts made by swibby
RE: OANDA Data - Generating OHLC candles that incorporate bid/ask
OANDA Data - Generating OHLC candles that incorporate bid/ask
I'm interested in developing a strategy that is correctly penalized by the spread as that is how OANDA incorporates its commission. Of course the spread is dynamic so making a static assumption about the spread size isn't particularly accurate.
OANDA does allow you to request bid & ask data when making a history request and provides the data in OHLC format (e.g. for the close you get both a bid and ask price). However, as far as I can tell backtrader uses either the bid or the ask price in the data set meaning the one not used gets dropped and for testing purposes the spread is effectively lost.
Is there anyway to construct the OHLC candles incorporating both the bid and the ask price as separate values?
It appears I might be able to work around this by replacing the hierarchy as outlined in the escape from ohlc land post but that has the downside of losing access to some of the pre-built indicators.
I'm new to backtrader and am guessing I could rebuild any indicators I might need, but I figured I'd ask if there's native functionality so I can avoid that extra effort.