1.Python 3.7+ Download it from here https://www.python.org/downloads/release/python-370/ then install it 2.Google Chrome browser 3.Chrome driver: Download the chrome driver corresponding to chrome browser version from here (https://chromedriver.chromium.org/downloads). To know chrome browser version, click on the three dots and select help->About Google Chrome (version number We need is the first 3 numbers, i,e,:110.x). Download chrome driver and extract it inside the cloned repository
4.The path of your Chrome profile. To get the profile path, write chrome://version/ in the browser address bar and press enter . You will long list of configurations, and "Profile Path" is one of them. the value of "Profile Path" (after removing "\Default" from its end) is what u need. It should look like this C:\Users<USERNAME>\AppData\Local\Google\Chrome\User Data Note that you need to be logged in automatically in Trading view in this profile, otherwise the app won't work
5.Install tesseract (used for OCR). The guide here explains how to install it properly. Note that we need the exe path, it will be something like C:\Program Files\Tesseract-OCR\tesseract.exe
open terminal in the folder having the code and run:
python -m pip install -r requirements.txt
Open the .env file near the code and edit the following:
- TESSERACT_CMD: path to tesseract.exe (Perquisites step no.5)
In a cmd terminal in the folder having the cloned code run here is how
python app.py
-
Fill the following data in the UI: a. Strategy Chart URL: The share link of the chat (example: https://www.tradingview.com/chart/XYZABC/) b. Google Chrome profile path: Path to google chrome profile having trading view auto logged-in (Perquisites step no.4) c. Output CSV: name of the output csv file
-
Strategy paramters: For the first time for a strategy, the app needs to know the strategy parameters. To do so, click on "Capture" button. It will open the strategy and figures its parameters by looping over them. Next times, you do not need to re-capture (unless the strategy is changed). Just click "Load parameters" and the previously captured parameters will be auto loaded
-
Parameters values: The app shows the available parameters for strategy. To include some parameter in the optimization process, tick its use checkbox. For numeric values you have to specify maximum value, minimum value and step size for the values
-
Optimization To start optimization, click "Execute. Google chrome will start and will navigate to the chart doing scan over the selected parameters (while keeping the rest on their default value). It waits for a yellow label to change its data then parses its content (using OCR). Finally, it saves the parsed data into a csv and continues till all selected parameters and their combinations are scanned.