joeldg / bowhead

PHP trading bot framework
Apache License 2.0
801 stars 288 forks source link

timePeriods in longer Strategies #46

Open skecskes opened 7 years ago

skecskes commented 7 years ago

Hi Joel, Firsty, let me thank you for doing this project. You are doing fantastic job and it's a great source of information. I was lately looking into strategies and I see that you are running all your strategies with 1m charts, even those intended to be run on longer charts. However, I was looking into 5m, 15m and 30m strategies. For example strategy bowhead_double_volatility is using Trader::rsi($data['close'], 11); which will use 11 timePeriods from 1m charts. Therefore it will calculate such indicator from last 11 minutes. That seems reasonable for me.

You mention in your blog, that this strategy is expected to be run in 30m periods. I assume that $data provided to strategy should be then 30m charts rather than 1m charts and so Trader::rsi($data['close'], 11); would calculate signal from last 11*30= 330minutes charts. Is that assumption correct? Or should I change this timePeriod to lower in case I want to use 30m charts?

Thank you for reply.

vitoo commented 6 years ago

Yes that's it

Keep running the ohlc data stream