Keep track of both the daily and weekly candles? - Printable Version +- Gekko Forum (https://forum.gekko.wizb.it) +-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html) +--- Forum: Strategy Development (https://forum.gekko.wizb.it/forum-12.html) +--- Thread: Keep track of both the daily and weekly candles? (/thread-57961.html) |
Keep track of both the daily and weekly candles? - boba - 07-01-2019 I am trying to keep track of the daily and the weekly candles. I set the default candle to the daily. I am attempting to use CandleBatcher, but when I log out the candles for both the daily and the weekly, I noticed the order is strange. For example, if I just wanted to keep track of the weekly price and price of the previous day, the daily candles sort of "get ahead" of the weekly candles and it's inconsistent. I am sure I am just doing something wrong, but if not I am thinking of a better way to store them. Perhaps store a map of the last 30 days where: date => { dailyCandle, weeklyCandle } or something. Code: strat.init = function () { |