This repository has been archived by the owner on Feb 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4k
less candles when using talib and candleSize < 0.5 * batchSize #2522
Comments
Can you provide a reproducable test case? eg your strategy and logging code |
Managu
…On Wed, Sep 12, 2018, 11:05 AM Pankaj Goyal ***@***.***> wrote:
*I'm submitting a ...*
[x] bug report
[ ] question about the decisions made in the repository
*Action taken* (what you did)
Talib indicator added and candle size < 0.5 * batchSize
*Expected result* (what you hoped would happen)
The total number of candles executed should be as per the time period and
candle size. eg. 60 candles in 1 hour
*Actual result* (unexpected outcome)
Less than expected candles are executed. eg.
Strategy run duration = 24 hours, batchSize = 50, candleSize = 30.
Expected candles = 48, Actual = 48
Strategy run duration = 24 hours, batchSize = 50, candleSize = 20.
Expected candles = 72, Actual = 59
Strategy run duration = 24 hours, batchSize = 50, candleSize = 10.
Expected candles = 144, Actual = 59
Strategy run duration = 24 hours, batchSize = 40, candleSize = 10.
Expected candles = 144, Actual = 75
Strategy run duration = 24 hours, batchSize = 20, candleSize = 10.
Expected candles = 144, Actual = 144
*Other information* (e.g. detailed explanation, stacktraces, related
issues, suggestions how to fix, links for us to have context, eg.
stackoverflow, etc)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2522>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AilBefVGAZ4KAsximx-sX3rm6srUU_G_ks5uaT7wgaJpZM4Wlzij>
.
|
Strategy var strat = {};
strat.init = function () {
this.addTalibIndicator('mom', 'mom', { optInTimePeriod: 10 });
this.count = 0;
}
strat.check = function (candle) {
console.log(this.count++);
}
module.exports = strat; config: config.tradingAdvisor = {
enabled: true,
method: 'test',
candleSize: 15,
historySize: 150
}
config.backtest = {
//daterange: 'scan',
daterange: {
from: "2018-05-14 00:00:00",
to: "2018-05-14 01:00:00"
},
batchSize: 50
} Output: |
Thanks for the report! I was able to reproduce and pushed a fix, could you download the develop branch and let me know if that solves it? If it doesn't please comment here. |
askmike
added a commit
that referenced
this issue
Sep 16, 2018
It works now. Thanks Mike. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm submitting a ...
[x] bug report
[ ] question about the decisions made in the repository
Action taken (what you did)
Talib indicator added and candle size < 0.5 * batchSize
Expected result (what you hoped would happen)
The total number of candles executed should be as per the time period and candle size. eg. 60 candles in 1 hour
Actual result (unexpected outcome)
Less than expected candles are executed. eg.
Strategy run duration = 24 hours, batchSize = 50, candleSize = 30. Expected candles = 48, Actual = 48
Strategy run duration = 24 hours, batchSize = 50, candleSize = 20. Expected candles = 72, Actual = 59
Strategy run duration = 24 hours, batchSize = 50, candleSize = 10. Expected candles = 144, Actual = 59
Strategy run duration = 24 hours, batchSize = 40, candleSize = 10. Expected candles = 144, Actual = 75
Strategy run duration = 24 hours, batchSize = 20, candleSize = 10. Expected candles = 144, Actual = 144
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)
Gekko v0.6.6
macOS 10.13.6 (17G65)
The text was updated successfully, but these errors were encountered: