Please help by providing information about the failure. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
run backtester with the attached configuration file:
go run . -configpath=/root/.gocryptotrader/strategy/config/rsi-api-candles-latest.strat
(in my case it is placed in /root/.gocryptotrader/strategy/config/rsi-api-candles-latest.strat)
Failure Logs
No log files are generated, but I have attached the strategy configuration which causes the crash.
rsi-api-candles-latest.strat.txt
It seems that the crash is caused by division by zero in
backtester/eventhandlers/statistics/currencystatistics.go:66
New Issue
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Operating System: Linux
GoCryptoTrader version (
gocryptotrader -version
): latest git snapshot built from sourceExpected Behavior
Backtester should run correctly and generate a results file
Current Behavior
Backtester panics with the following error message
Failure Information (for bugs)
Please help by providing information about the failure. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Failure Logs
No log files are generated, but I have attached the strategy configuration which causes the crash. rsi-api-candles-latest.strat.txt
It seems that the crash is caused by division by zero in backtester/eventhandlers/statistics/currencystatistics.go:66
If
c.Events[i-1]
is missing data thenc.Events[i-1].DataEvent.ClosePrice()
is zero and division by zero occurs.