TreborNamor / TradingView-Machine-Learning-GUI

Embark on a trading journey with this project's cutting-edge stop loss/take profit generator, fine-tuning your TradingView strategy to perfection. Harness the power of sklearn's machine learning algorithms to unlock unparalleled strategy optimization and unleash your trading potential.
https://www.robertsportfolio.dev/
MIT License
756 stars 227 forks source link

Entering information in the wrong masks? #21

Closed septarchy closed 2 years ago

septarchy commented 3 years ago

Hello and thanks for developing such a great peace of software and sharing this with the community! :)

I'm currently backtesting your script, but i encounter several 'problems'

When trying to find the optimal settings, it uses the wrong masks? And starts to enter limit orders like crazy: afbeelding

afbeelding

I guess it would be quite important to make sure it doesn't enter this information in the ordering field?

Script output:

Generating Max Profit For Stop Loss.
Loading script...

Net Profit: 19.98% --> Long Stoploss: 14.2, Long Take Profit: 16.6, Short Stoploss: 3.2, Short Take Profit: 3.3
Net Profit: 19.98% --> Long Stoploss: 16.7, Long Take Profit: 2.4, Short Stoploss: 26.3, Short Take Profit: 23.8
Net Profit: 19.98% --> Long Stoploss: 5.4, Long Take Profit: 17.9, Short Stoploss: 25.6, Short Take Profit: 15.9
Net Profit: 19.98% --> Long Stoploss: 13.6, Long Take Profit: 4.9, Short Stoploss: 26.8, Short Take Profit: 6.0
Net Profit: 19.98% --> Long Stoploss: 11.3, Long Take Profit: 0.6, Short Stoploss: 6.7, Short Take Profit: 8.4
Net Profit: 19.98% --> Long Stoploss: 3.5, Long Take Profit: 8.8, Short Stoploss: 23.4, Short Take Profit: 23.8
Net Profit: 19.98% --> Long Stoploss: 19.9, Long Take Profit: 2.8, Short Stoploss: 14.3, Short Take Profit: 1.1
Net Profit: 19.98% --> Long Stoploss: 12.2, Long Take Profit: 9.0, Short Stoploss: 23.7, Short Take Profit: 21.8
Net Profit: 19.98% --> Long Stoploss: 1.2, Long Take Profit: 18.3, Short Stoploss: 24.7, Short Take Profit: 15.4
Net Profit: 19.98% --> Long Stoploss: 11.8, Long Take Profit: 7.5, Short Stoploss: 2.3, Short Take Profit: 16.0
Net Profit: 19.98% --> Long Stoploss: 16.7, Long Take Profit: 17.7, Short Stoploss: 25.9, Short Take Profit: 10.1
Net Profit: 19.98% --> Long Stoploss: 18.7, Long Take Profit: 16.2, Short Stoploss: 14.4, Short Take Profit: 6.5
Net Profit: 19.98% --> Long Stoploss: 18.3, Long Take Profit: 5.4, Short Stoploss: 29.1, Short Take Profit: 21.7
Net Profit: 19.98% --> Long Stoploss: 8.6, Long Take Profit: 6.6, Short Stoploss: 19.3, Short Take Profit: 9.5
Net Profit: 19.98% --> Long Stoploss: 19.8, Long Take Profit: 10.0, Short Stoploss: 2.9, Short Take Profit: 13.2
Net Profit: 19.98% --> Long Stoploss: 4.0, Long Take Profit: 7.0, Short Stoploss: 15.4, Short Take Profit: 20.3
Net Profit: 19.98% --> Long Stoploss: 9.3, Long Take Profit: 0.8, Short Stoploss: 27.8, Short Take Profit: 22.4
Net Profit: 19.98% --> Long Stoploss: 4.5, Long Take Profit: 8.8, Short Stoploss: 23.5, Short Take Profit: 26.5
Net Profit: 19.98% --> Long Stoploss: 0.8, Long Take Profit: 5.8, Short Stoploss: 4.3, Short Take Profit: 18.2
Net Profit: 19.98% --> Long Stoploss: 4.4, Long Take Profit: 3.1, Short Stoploss: 0.8, Short Take Profit: 8.8
Traceback (most recent call last):
  File "TradeViewGUI.py", line 122, in optimize_longs_shorts
    if self.comboBox.currentIndex() == 0:
  File "OptimizeLongsShorts.py", line 17, in __init__

  File "OptimizeLongsShorts.py", line 65, in run_script
    # Click settings button
  File "my_functions.py", line 204, in click_all_inputs
    long_takeprofit_input_box = \
  File "selenium\webdriver\remote\webdriver.py", line 410, in find_elements_by_xpath
  File "selenium\webdriver\remote\webdriver.py", line 1005, in find_elements
  File "selenium\webdriver\remote\webdriver.py", line 321, in execute
  File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette

Running on windows with latest firefox

TreborNamor commented 3 years ago

oh wow, that is very strange. Try opening up the side panel and clicking the watchlist like in the picture below. Then on keyboard press "CTRL + s" to save your chart. Hopefully that side panel your having trouble with doesn't pop up anymore. If it continues please share a video so i can see how the program ended up there on that side panel. image