You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far, I have solved many problems and successfully integrated my strategy into Backtesting.py. However, I am currently facing a final issue that I have tried to resolve in every possible way, but I still cannot solve it.
Functions
prepare()
Initializes the data for Backtesting.py.
ohlc()
Retrieves chart data.
indicators()
Obtains analysis data.
TestAnalytics.start()
Initializes the main analytics core.
TestAnalytics.run()
Retrieves live data or data from a CSV file.
Applies strategies and indicators.
Saves the processed data in data.csv and returns it.
Start 2023-09-26 00:00:00
End 2024-01-22 20:00:00
Duration 118 days 20:00:00
Exposure Time [%] 0.0
Equity Final [$] 10000.0
Equity Peak [$] 10000.0
Return [%] 0.0
Buy & Hold Return [%] 2.813628
Return (Ann.) [%] 0.0
Volatility (Ann.) [%] 0.0
Sharpe Ratio NaN
Sortino Ratio NaN
Calmar Ratio NaN
Max. Drawdown [%] -0.0
Avg. Drawdown [%] NaN
Max. Drawdown Duration NaN
Avg. Drawdown Duration NaN
# Trades 0
Win Rate [%] NaN
Best Trade [%] NaN
Worst Trade [%] NaN
Avg. Trade [%] NaN
Max. Trade Duration NaN
Avg. Trade Duration NaN
Profit Factor NaN
Expectancy [%] NaN
SQN NaN
_strategy LimitOrderStrate...
_equity_curve ...
_trades Empty DataFrame
...
dtype: object
sma_candleback
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
11 NaN
12 NaN
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
Name: Win Rate [%], dtype: float64
I tried assigning the data to sefla.data in init(), but it doesn't work because the library takes the data only at the first initialization, not during every optimization loop.
I'm trying to use self.counter but I think it's not working.
Goal
I want to optimize my strategies and indicators.
The text was updated successfully, but these errors were encountered:
In the past 15 days, I have watched Mr. Chad Thackray's playlist on YouTube twice and read the Backtesting.py API Reference Documentation. I primarily work with dictionaries because I find NumPy and pandas a bit complicated, so my experience is working on dictionaries.
So far, I have solved many problems and successfully integrated my strategy into Backtesting.py. However, I am currently facing a final issue that I have tried to resolve in every possible way, but I still cannot solve it.
Functions
prepare()
Initializes the data for
Backtesting.py
.ohlc()
Retrieves chart data.
indicators()
Obtains analysis data.
TestAnalytics.start()
Initializes the main analytics core.
TestAnalytics.run()
data.csv
and returns it.data.csv
Previewoptimaze.py
CodeDebugging
ohlc() return
indicators() return
indicator_array
in init()indicator_data
in init()self.actions
in init()action
in next()Using
[-1]
in next()All values are 0
Using
self.counter
in next()The values are correct, but they do not update with each change in sma_candleback during optimization.
Output
Using
[-1]
in next()Code
Result
Using
self.counter
in next()Code
Result
Other attempts
I tried assigning the data to sefla.data in init(), but it doesn't work because the library takes the data only at the first initialization, not during every optimization loop.
I'm trying to use
self.counter
but I think it's not working.Goal
I want to optimize my strategies and indicators.
The text was updated successfully, but these errors were encountered: