akumidv / tradingview-assistant-chrome-extension

An assistant for backtesting trading strategies and checking (showing) external signals in Tradingview implemented as a Chrome browser extension.
GNU General Public License v3.0
176 stars 63 forks source link

How can I solve the issue of web page crashes due to too many backtest runs? #172

Open g001613001 opened 5 months ago

g001613001 commented 5 months ago

Currently, I can only manage to control the number of tests to about 3,000 sets per session. If it exceeds 3,000 sets, the web page tends to crash. What are some good solutions to prevent the web page from crashing and allow more than 3,000 backtest runs?

At the moment, I can only manage by refreshing the web page after every 3,000 test runs to avoid crashes, and then continue with further testing.

akumidv commented 5 months ago

The problem in memory limits, this will be improved in new refactored version. But I'm working on it more than 3 month and probably it will demand the same time.

g001613001 commented 5 months ago

The problem in memory limits, this will be improved in new refactored version. But I'm working on it more than 3 month and probably it will demand the same time.

Great! I look forward to your solution to the memory management issue.

VincenzoUrso commented 5 months ago

try different browsers, every one reacts in a different way. edge is actually the one that (almost) never crash for me

g001613001 commented 5 months ago

try different browsers, every one reacts in a different way. edge is actually the one that (almost) never crash for me

I will tiy edge, thank you!

pegaltier commented 4 months ago

The problem in memory limits, this will be improved in new refactored version. But I'm working on it more than 3 month and probably it will demand the same time.

@akumidv Can I ask you which Web framework are you using for building the new version? Angular, React, Vue? Other? thanks!

g001613001 commented 4 months ago

I've tried using Edge on both Mac and Windows, and I still experience webpage crashes.

try different browsers, every one reacts in a different way. edge is actually the one that (almost) never crash for me

g001613001 commented 4 months ago

The problem in memory limits, this will be improved in new refactored version. But I'm working on it more than 3 month and probably it will demand the same time.

I've discovered something that might help solve the issue of web page crashes. I suspect it's due to not releasing the data accumulated during backtests, which causes the crashes. The data I'm referring to is what eventually gets downloaded as a CSV file. I noticed something interesting during my tests: if the data provided by TradingView during a backtest is identical across runs, it won't be stored or appear in the final CSV file. Interestingly, without this stored data, I was able to exceed the 3,000 test limit I mentioned before, even reaching over 10,000 tests without issues.

So, I was thinking, maybe you could implement a feature where we can input a parameter for the backtest to run between 1,000 and 3,000 tests. After reaching the specified number, it would automatically download the stored data as a CSV file and clear this data to free up memory, then resume the backtest from where it left off.

This approach might resolve the issue of web page crashes.

This finding is based on my experience with the latest plugin version, and I hope it can help you address the web page crash issue.