{"id":13611013,"url":"https://github.com/Leci37/TensorFlow-stocks-prediction-Machine-learning-RealTime","last_synced_at":"2025-04-13T01:34:16.171Z","repository":{"id":74791709,"uuid":"520812259","full_name":"Leci37/TensorFlow-stocks-prediction-Machine-learning-RealTime","owner":"Leci37","description":"Predict operation stocks points (buy-sell) with past technical patterns, and powerful machine-learning libraries such as: Sklearn.RandomForest , Sklearn.GradientBoosting, XGBoost, Google TensorFlow and Google TensorFlow LSTM..Real time Twitter:","archived":false,"fork":false,"pushed_at":"2024-05-17T08:06:38.000Z","size":30230,"stargazers_count":234,"open_issues_count":5,"forks_count":74,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-08-01T19:56:18.704Z","etag":null,"topics":["deep-learning","machine-learning","python","stocks","tensorflow","trade","trader-bot"],"latest_commit_sha":null,"homepage":"https://twitter.com/Whale__Hunters","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Leci37.png","metadata":{"files":{"readme":"README.md","changelog":"news_sentiment/ReadMe_TODO.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-03T09:14:31.000Z","updated_at":"2024-07-21T08:25:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9f64a31-40eb-47cf-a66b-794cc3ce44b8","html_url":"https://github.com/Leci37/TensorFlow-stocks-prediction-Machine-learning-RealTime","commit_stats":null,"previous_names":["leci37/tensorflow-stocks-prediction-machine-learning-realtime","leci37/stocks-prediction-machine-learning-realtime-tensorflow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leci37%2FTensorFlow-stocks-prediction-Machine-learning-RealTime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leci37%2FTensorFlow-stocks-prediction-Machine-learning-RealTime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leci37%2FTensorFlow-stocks-prediction-Machine-learning-RealTime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leci37%2FTensorFlow-stocks-prediction-Machine-learning-RealTime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leci37","download_url":"https://codeload.github.com/Leci37/TensorFlow-stocks-prediction-Machine-learning-RealTime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558482,"owners_count":17165140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","machine-learning","python","stocks","tensorflow","trade","trader-bot"],"created_at":"2024-08-01T19:01:50.880Z","updated_at":"2025-04-13T01:34:16.155Z","avatar_url":"https://github.com/Leci37.png","language":"Python","funding_links":["https://www.buymeacoffee.com/leci37"],"categories":["Python"],"sub_categories":[],"readme":"If you have problems with installation, let me know. \nI am searching _**collaborators for this project**_. If you have experience and want to collaborate We are currently developing privately, if you want to join the team please contact us.\n\n**Here the result: https://tuisku.eu/**\n\n\n _**SEE ALSO**_ [Machine Learning Strategy](https://github.com/Leci37/Strategy-stock-Random-Forest-ML-sklearn-TraderView/tree/main)      \u003cimg src=\"https://github.com/Leci37/ML-Sklearn-strategy-stock-crypto-for-TraderView/blob/main/img/give_a_start-RB.png\" alt=\"give_a_start.jpg\" width=\"30\" /\u003e  \nhttps://www.linkedin.com/in/luislcastillo/ \n\n### Why this stock prediction project ?\nThings this project **offers** that I did not find in other free projects, are:\n\n+ Testing with _**36 models**_. Multiple combinations features and multiple selections of models, easily expandable (TensorFlow , XGBoost, Sklearn, LSTM, GRU, dense, LINEAR etc  )\n+ Threshold and quality _**models evaluation**_\n+ Use _**637**_ technical stocks indicators\n+ Independent neural network selection of the best technical patterns for each stock\n+ Response _**categorical target**_ (do buy, do sell and do nothing) simple and dynamic,  instead of poor and confused, continuous target variable (\"the stock will be worth 32.4 in 2 days\")\n+ Powerful open-market-_**real-time**_ evaluation system \n+ Versatile integration with: Twitter, Telegram and Mail\n+ Train Machine Learning model with _**Fresh today stock data**_ \n\nThe project is long and dense, trying to install it without understanding is a mistake, the first thing to do is to run and understand the **[TUTORIAL](#tutorial)**,\n\n\nTo manage collaborations we have a  **Telegram GROUP:** \nhttps://t.me/+3oG6U_hp93I2M2Ix (Once executed and understood the tutorial)\n (recommended to review the point: https://github.com/Leci37/stocks-prediction-Machine-learning-RealTime-telegram/edit/master/README.md#possible-improvements). \n\n**Strategy models** with Randon Forest, simpler [Randon Forest](https://github.com/Leci37/Strategy-stock-Random-Forest-ML-sklearn-TraderView)\n\n---\n  * [Why this stock prediction project ?](#why-this-stock-prediction-project--)\n    + [AUTHOR'S LICENSE:](#author-s-license-)\n- [**TUTORIAL**](#tutorial)\n      - [IMPORTANT: Once executed and understood, join the community to avoid repeating work or try out useless developments already done.](#important--once-executed-and-understood--join-the-community-to-avoid-repeating-work-or-try-out-useless-developments-already-done)\n  * [INTRODUCTION](#introduction)\n    + [Self-fulfilling prophecy principle](#self-fulfilling-prophecy-principle)\n    + [Ground True is the variable `buy_seel_point`](#ground-true-is-the-variable--buy-seel-point-)\n  * [Quick start-up Run your own models](#quick-start-up-run-your-own-models)\n- [**Detailed start-up**](#detailed-start-up)\n    + [1 Historical data collection](#1-historical-data-collection)\n      - [**1.0** (Recommended) alphavantage API](#--10----recommended--alphavantage-api)\n      - [**1.1** The OHLCV history of the stock must be generated.](#--11---the-ohlcv-history-of-the-stock-must-be-generated)\n    + [2 Filtering technical indicators (automatically by default)](#2-filtering-technical-indicators--automatically-by-default-)\n    + [3 Training TensorFlow XGB and Sklearn](#3-trian-tensorflow-xgb-and-sklearn)\n    + [4 Evaluate quality of predictive models](#4-evaluate-quality-of-predictive-models)\n    + [5 Predictions](#5-predictions)\n      - [**5.0** make predictions of the last week Optional Test](#--50---make-predictions-of-the-last-week-optional-test)\n      - [**5.1** Getting OHLCV data in real time](#--51---getting-ohlcv-data-in-real-time)\n      - [**5.2** Setting up chatIDs and tokens in Telegram](#--52---setting-up-chatids-and-tokens-in-telegram)\n      - [**5.3** Sending real-time alerts Telegram](#--53---sending-real-time-alerts-telegram)\n- [**Possible improvements:**](#--possible-improvements---)\n      - [Combine the power of the 17 models](#combine-the-power-of-the-17-models)\n      - [Better use tuners](#better-use-tuners)\n      - [Real-time alert with .png financial data](#real-time-alert-with-png-financial-data)\n      - [Improvements in predictive models using multi-dimensional](#improvements-in-predictive-models-using-multi-dimensional)\n      - [Review the way ground true is obtained](#review-the-way-ground-true-is-obtained)\n      - [For unbalanced classes, you should look at the F1-score](#for-unbalanced-classes--you-should-look-at-the-f1-score)\n      - [Review the free code winners of KAGGLE](#review-the-free-code-winners-of-kaggle)\n      - [Are 3 GrounsTrue detection tags sufficient or are subclasses required?](#are-3-grounstrue-detection-tags-sufficient-or-are-subclasses-required-)\n      - [Remove columns that have more than 0.9 correlation between them](#remove-columns-that-have-more-than-09-correlation-between-them)\n      - [Architecture to Reinforcement Learning](#architecture-to-reinforcement-learning)\n      - [MonoLabel vs MultiLabel](#monolabel-vs-multilabel)\n      - [Show TF heat map of the detected decison](#show-tf-heat-map-of-the-detected-decison)\n      - [Use benefit evaluation function instead of Y target](#use-benefit-evaluation-function-instead-of-y-target)\n      - [Imagine the operating points (generative adversarial networks)](#imagine-the-operating-points--generative-adversarial-networks-)\n      - [Testing the MachineLearning platforms of large IT companies](#testing-the-machinelearning-platforms-of-large-it-companies)\n      - [Add news sentiment indicator](#add-news-sentiment-indicator)\n      - [Add balance sheets](#add-balance-sheets)\n      - [**Recommended reading LSTM plus stock price FAIL**](#recommended-reading-lstm-plus-stock-price-fail)\n      - [Review of all forms of time series prediction: lstm,gru,cnn and rnn](#review-of-all-forms-of-time-series-prediction--lstm-gru-cnn-and-rnn)\n      - [Lighter improvements list of suggested](#lighter-improvements-list-of-suggested)\n  * [**Instructions for final user**](#instructions-for-final-user)\n      - [The alert consists of the following:](#the-alert-consists-of-the-following-)\n        * [Example of how the alerts looks like in **Twitter**:](#example-of-how-the-alerts-looks-like-in---twitter---)\n        * [Example of how the alerts looks like in **Telegram**:](#example-of-how-the-alerts-looks-like-in---telegram---)\n  * [Program Description {OLD}](#program-description--old-)\n    + [USE THE SOFTWARE AT YOUR OWN RISK THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS](#use-the-software-at-your-own-risk-the-authors-and-all-affiliates-assume-no-responsibility-for-your-trading-results)\n    + [Technical Patterns all Names](#technical-patterns-all-names)\n\n\u003csmall\u003e\u003ci\u003e\u003ca href='http://ecotrust-canada.github.io/markdown-toc/'\u003eTable of contents generated with markdown-toc\u003c/a\u003e\u003c/i\u003e\u003c/small\u003e\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/leci37)\n\n#### AUTHOR'S LICENSE:\nThis project is a very _**long mountain of work free**_, it is given to the public on _**one condition**_, if you make any major improvement, let me know via public or private (leciluis@gmail.com), [the improvement will not be made public if you do not want it]. \n\nAny other kind of contact with us, please go to the ISSUES tab.  \n\n#### author's note IMPORTANT:\nBefore assembling everything check the tutorial code, **the predictive models require improvement** without cheating. (95% of the predictive code is in the tutorial). \nThe stock market does not only work with technical patterns, you need to know more about the inner workings.  Important to review the article: [My neural network does not improve](https://www.linkedin.com/pulse/my-neural-network-does-improve-through-classical-means-luis-leci%25C3%25B1ana-hsj0f)\n\n## TUTORIAL\n\nThe project is long and dense, _**trying to install it without understanding it is a mistake**_, the first thing to do is to run and understand the tutorial file, located in `Tutorial/RUN_buy_sell_Tutorial_3W_5min_RT.py`\nit will show in a summarized way the global steps of the project [RUN_buy_sell_Tutorial_3W_5min_RT](https://github.com/Leci37/stocks-prediction-Machine-learning-RealTime-telegram/blob/master/Tutorial/RUN_buy_sell_Tutorial_3W_5min_RT.py)\n :\n1. [1] Reading OLHCV data\n1. [2] Extraction of all technical patterns \n1. [3] Calculation of the grount true, the Y_target to detect in real time (where to _do nothing_, _do buy_ or _do sell_)\n1. [4] Remove unhelpful or noisy technical patterns\n1. [5] Normalise the data, for correct training the values must be normalised to between 0 and 1\n1. [6] Create '_windows_' of time, for a Y_target prediction use +-4 hours later of technical patterns, not just the current value of the patterns \n1. [7] Splitting between training data and evaluation data \n1. [8] Ground True Y_target data are unbalanced Given that there is a lot of 'do nothing' 0, and very little 'do buy' 1 or 'do sell' 2,\" weight balancing is required, to give more importance to the minorities.\n1. [9] Creation of the TF model architecture \n1. [10] Start the TF training and save it\n1. [11] Evaluating the quality of the model \n\n_**Note:**_ inside the file `Tutorial/RUN_buy_sell_Tutorial_3W_5min_RT.py` , it is very important to understand the author's experience inside **print()** and **#TIP** comments. \n[RUN_buy_sell_Tutorial_3W_5min_RT](https://github.com/Leci37/stocks-prediction-Machine-learning-RealTime-telegram/blob/master/Tutorial/RUN_buy_sell_Tutorial_3W_5min_RT.py)\n\nPoints: _2,3,4,9,10_ and _11_ **_should be refined and improved_**.    For more details about improvements there is point [**Possible improvements:**](#combine-the-power-of-the-17-models) .\n\n##### IMPORTANT: Once executed and understood, join the community to avoid repeating work or try out useless developments already done.  \n_**Telegram GROUP:**_ https://t.me/+3oG6U_hp93I2M2Ix  \n\n### INTRODUCTION\nThe stock market is moved by technical indicators, there are several types of volatility, cycle volume, candlesticks, supports, resistances, moving averages...\n\nAn excellent site to see all the stock market technical indicators is webull https://app.webull.com/trade?source=seo-google-home. \n\nImage: webull with Stochastic, MACD and RSI indicators\n\n![](readme_img/Aspose.Words.b41e3638-ef34-4eaa-ac86-1fda8999e934.001.png)\n\n\nOn the stock market graphs have been invented EVERY possible way to predict the stock market, with mixed results, making clear the difficulty of predicting human behavior.\n\nThese indicators indicate where to buy and sell, there are many beliefs about them (we mean in beliefs, because if they always worked we would all be rich). \n\nAny technical indicator can be obtained by means of programmable mathematical operations.\n\nThree examples:\n\n**RSI** or Relative Strength Index is an oscillator that reflects relative strength\n\nGreater than 70 overbought, indicates that it will go down.\n\nLess than 70 oversold, indicates that it will go higher \n\n**MACD** is the acronym for Moving Average Convergence / Divergence. The MACD in the stock market is used to measure the robustness of the price movement. Through the crossing of the line of this indicator and the moving average\n\nIt operates on the basis of the crossovers between these two lines\n\nOr it is operated when both exceed zero.\n\n**Candlestick: Morning Star** The morning star pattern is considered a hopeful sign in a bearish market trend.\n![](readme_img/Aspose.Words.b41e3638-ef34-4eaa-ac86-1fda8999e934.002.png)\n\n\nThese indicators are present in refuted and popular websites like investing.com to be analyzed by the market \u003chttps://es.investing.com/equities/apple-computer-inc-technical\u003e\n\n###### How do I know when the WHALE touches the button, and breaks the model? \nIn the video you can see the whales manipulating the price, does anyone think they can predict when the madman in the City of London hits the button? It is recommended to understand that there are NOT VISIBLE data, and if they are not visible TF can not do miracles (TV and politicians say that AI does miracles, what it does is massive statistics with data).  If you don't understand this I think you should go to other projects. It is recommended to avoid this code in intervals less than 1 hour. \n\n**See the news** _A “fat-finger error” by a [London-based trader at Citigroup that triggered a flash crash](https://www.theguardian.com/business/2022/jun/03/flash-crash-set-off-by-fat-fingered-citigroup-trader-could-cost-50m) across European stock markets could cost the bank at least $50m (£39.8m)._\n**See video** [Chinese Whales Dumping Bitcoin](https://www.youtube.com/watch?v=pkgTAEsOWnA) or [alternative](https://www.youtube.com/shorts/IpIyo4YmfuY?app=desktop) .\nI ask the reader at this point, **how is this predicted?** _I don't have the testosterone data of the London Kids XD ._ 😄😄\n\n#### Self-fulfilling prophecy principle\n\nIt is extremely difficult to predict the price of any stock. Inflation, wars, populism, all this conditions affect the economy, and it becomes difficult, if not impossible to predict what Vladimir Putin will do tomorrow. \n\nHere enters the self-fulfilling prophecy principle of explained is, at first, a \"false\" definition of the situation, which awakens a new behavior that makes the original false conception of the situation become \"true\". Example:\n\n\n![](readme_img/Aspose.Words.b41e3638-ef34-4eaa-ac86-1fda8999e934.004.png)\n\n\n#### Ground True is the variable `buy_seel_point` GT\nThe model to be able to train in detecting points of purchase and sale, creates the column `buy_seel_point` has value of: 0, -100, 100. These are detected according to the maximum changes, (positive 100, negative -100) in the history of the last months, this point will be with which the training is trained, also called the *ground* true. \n\nDefining the GT (Ground True) is a subjective task, these numbers can be obtained in 2 ways:\n - `Utils_buy_sell_points.get_buy_sell_points_Roll` (default). Value will be assigned in buy_seel_point if the increase or decrease of the stock is greater than 2.5% in a period of 3 hours, using the get_buy_sell_points_Roll function.\n\n - `Utils_buy_sell_points.get_buy_sell_points_HT_pp` (decomments the line) Inspired by the TraderView technical indicator \"Pilots HL\".\n - For change the config to **1-day candlesticks** (with frequent daily changes of +-1% defined in the variable `PER_VALEU_CHANGE = 1`). You can see it in the method `get_GT_day_candle(df_kon)` and extra `rolling_buy_sell_val_BUY(df_ind)`it is strongly recommended to use this other function to obtain the GT, [file candlesticks GT day](https://github.com/Leci37/Strategy-stock-Random-Forest-ML-sklearn-TraderView/blob/main/technical_parameters_konk_tools_Prepro.py) \n\nOn the graphic, you can see the difference being:\n**_Blue_** the candle Close\n_**Red**_ the values obtained in `get_buy_sell_points_Roll()` the positive and negative peaks indicate sell and buy points.\nThe points obtained in `get_buy_sell_points_HT_pp()` are shown, the **_Orange_** peaks being the Buy points and the **_Green_** peaks being the Sell points.\n\n![](readme_img/GT_ways_3.PNG)\n\n### Quick start-up Run your own models\n\n \nInstall requirements (to know the exact version `Utils/requirements_x.y.z.txt`)\n```\npip install -r requirements.txt\n```\nBy default (recommendation) the stock list will be used: `\"@CHILL\": [\"UBER\", \"PYPL\"]`\n\nRun `0_API_alphavantage_get_old_history.py` Optional. File generate example:  `d_price/RAW_alpha/alpha_UBER_15min_20230414__20230317.csv`\nRun BETTER get **alpaca API** key and  `0_API_alpaca_historical.py` \n\nRun `1_Get_technical_indicators.py` Files generate example: `d_price/PYPL_PLAIN_stock_history_MONTH_3_AD.csv` and `plots_relations/best_selection_PYPL_both.json`\n\nRun `3_Model_creation_models_for_a_stock.py` Files generate example models TF .h5: `Models/TF_multi/TFm_UBER_neg_vgood16_mult_lstm.h5` , `Models/TF_multi/UBER_neg_vgood16__per_score.csv` and `Models/TF_multi/Scalers/UBER_neg_good9_.scal`\n\nRun `4_Model_creation_scoring_multi.py` Optional, evaluation the models predictions File generate:  `Models/TF_multi/_SCORE_ALL_multi_all.csv`\n\n**Having reached this point**, We would like to get to know you (this is a project of 11 months of work) and I would like you to tell me in Issues tab or Discussion tab what you think and if you see any utility in https://github.com/Leci37/stocks-prediction-Machine-learning-RealTime-telegram#possible-improvements. \nAt this point the **file** `realtime_model_POOL_driver.py` **is required**, you must **ask for it** . \n\n\nReal-time forecasts:\n\nRun `Utils/Volume_WeBull_get_tikcers.py` Ignore in case of using default configuration \n\nConfigure bot token see point 5**.2** Configuring chatID and tokens in Telegram\n\nRun `5_predict_POOL_enque_Thread.py`\n\nIt is possible to run it without configuring telegram point **5.2**, in that case no alerts will be sent in telegram, but if the results were recorded in real time in: *d_result/prediction_real_time.csv*\n\n## Detailed start-up\nModels with better accuracy are in _**Tutorial/RUN_5_models_0.61_accuracy.py**_\n\nTo do step 0, **installation or correct errors** in the installation there are also  [Step by step](Readme_setup_installation.md)\n\n(Running times are estimated for an intel i3 and 8GB of RAM)\n\n\n**0.0**The interpreter with which the tutorial has been made is python 3.8 , IDE Pycharm, caution with the compatibility between versions of the library pandas and python\nFor example: today do not use python 3.10 , as it is incompatible with pandas https://stackoverflow.com/questions/69586701/unable-to-install-pandas-for-python \n\n\n**0.1** Download and install requirements, the project is powerful and demanding in terms of libraries.\n\npip install -r requirements.txt \n(to know the exact version `Utils/requirements_x.y.z.txt`)\n\n**0.2** Search all files for the string `**DOCU**`\n\nthis allows to watch all files that are executable from the startup tutorial easily \n\n**0.3** In the file `_KEYS_DICT.py` all the configurations are stored, look at the document and know where it is.\n\nIn it there is the dictionary DICT_COMPANYS\n\nIt contains the IDs (GameStops quotes with the ID: **GME**) of the companies to analyze. You can customize and create a class from the **nasdaq** tikers, by default the key **@CHILL** will be used which will analyze these 2 companies.\n```python \n \"@CHILL\": [\"UBER\", \"PYPL\"],\n```\nIf more stock execution is desired, change to @FOLO3 o similar in file `_KEYS_DICT.py`\n\n#### 1 Historical data collection\n##### **1.0** (Recommended) alphavantage API\n` `The API yfinance , if you want price to price intervals in 15min intervals is limited to 2 months, to get more time data up to 2 years back (more data better predictive models) use the free version of the API https://www.alphavantage.co/documentation/  \n\nRun `0_API_alphavantage_get_old_history.py`\n\nRun BETTER get **alpaca API** key and  `0_API_alpaca_historical.py` \n\nThe class is customizable: action intervals, months to ask, and ID action.\n\nNote: being the free version, there is a portrait between request and request, to get a single 2 years history it takes 2-3 minutes per action. \n\nOnce executed, the folder: *d_price/RAW_alpha* will be filled with **_2 years extra_** historical OHLCV .csv of share prices. These files will be read in the next step. Example path name: `d_price/RAW_alpha/alpha_UBER_15min_20230414__20230317.csv`\n\nCheck that one has been generated for each action in *d_price/RAW_alpha*.\n\n\n##### **1.1** The OHLCV history of the stock must be generated.\nAs well as the history of technical patterns. It takes +-1 minute per share to calculate all technical patterns. \n\nRun `1_Get_technical_indicators.py`\n\n**ALL technical indicators** in python you can find here, look the funtion extract_features(df: pd.DataFrame,extra_columns =False,  shift=150, debug=False) inside https://github.com/Leci37/TensorFlow-stocks-prediction-Machine-learning-RealTime/blob/master/features_W3_old/v3.py some of the technical indicators take future data, be careful.\n\nOnce executed the folder: *d_price* will be filled with historical OHLCV .csv of share prices.\n\nThree types of files are generated (Example of name type for action: AMD):\n\n- *AMD_SCALA_stock_stock_history_MONTH_3_AD.csv* with all technical patterns calculated and applied a fit scaler(-100, 100), i.e. the stock prices are scaled (size: 30-90mb)\n- *d_price/min_max/AMD_min_max_stock_MONTH_3_AD.csv* with scaling keys (size: 2-7kb)\n- *AMD_stock_history_MONTH_3_AD.csv* the pure history of the OHLCVs (size: 2-7mb)\n\nNote: *MONTH_3_AD* means 3 months of *API* yfinance plus the history collected from alphavantage. Point 1.0\n\nCheck that one has been generated for each action.\n\n\n#### 2 Filtering technical indicators (automatically by default)\nThis step is done automatically and the variable `GENERATED_JSON_RELATIONS` (in `get_technical_indicators.py`)  is set to True (default True). \nIt is necessary to separate the technical indicators which are related to buy or sell points and which are noise. 20 seconds per share \n\nRun `Feature_selection_create_json.py` (**uncommnet** `for l in list_stocks:` )\n\nThree files are generated for each action in the folder: *plots_relations* , relations for purchase \"pos\", relations for sale \"neg\" and relations for both \"both\".\n\n- *plots_relations/best_selection_AMD_both.json*\n\nThese files contain a ranking of which technical indicator is best for each stock. \n\nCheck that three .json have been generated for each action in *plots_relations* .\n\n#### 3 Trian TensorFlow XGB and Sklearn  \nTrain the models, for each action 36 different models are trained.\n15 minutes per share.\n\nRun `3_Model_creation_models_for_a_stock.py`  *Requires Declaration.py, request it* https://github.com/Leci37\n\nThe following files are generated for each action:\n\n~~*Models/Sklearn_smote* folder:~~ _[OBSOLETE]_\n\n- XGboost_AMD_yyy_xxx_.sav\n- RandomForest_AMD_yyy_xxx_.sav\n- XGboost_AMD_yyy_xxx_.sav\n\n~~*Models/TF_balance* folder:~~ _[OBSOLETE]_\n\n- TF_AMD_yyy_xxx_zzz.h5\n- TF_AMD_yyy_xxx_zzz.h5_accuracy_71.08%__loss_0.59__epochs_10[160].csv\n\n*Models/TF_multi* folder: \n\n- TFm_AMD_yyy_xxx_zzz.h5  \n  - Purely saved TF model\n- TFm_AMD_yyy_xxx_zzz.h5_accuracy_71.08%__loss_0.59__epochs_10[160].csv \n  - Training statistics lost, accuracy against unseen data \"Validation\", against unseen data \"Test\" and information , against seen data \"Test\" and information of input columns\n- Scalers/AMD_yyy_xxx_.scal\n  - TF can only be entered with values from 0 to 1, the object containing the scaling patterns is saved in .scal format, it will be very useful in real time reading. \n\nxxx can take value vgood16 good9 reg4 and low1 \n\nyyy can take value \"pos\" and \"neg\".\n\nzzz can take value s28 s64 and s128\n\nCheck that all combinations of files exposed by each action have been generated in the /Models subfolders.\n\n\n#### 4 Evaluate quality of predictive models \nFrom the 36 models created for each OHLCV history of each stock, only the best ones will be run in real time, in order to select and evaluate those best ones.\n\nRun `4_Model_creation_scoring_multi.py`\nYou can see how around 36 TF .h5 models are generated per action, you have to evaluate the 36 and collect the 1-3 best models to use them in real time, this information will be dumped in the files:\n- Models/TF_multi/_RESULTS_profit_multi_all.csv\n- Models/TF_multi/_SCORE_ALL_multi_all.csv\n\nCheck that two have been generated for each action.\n\n**Having reached this point**, We would like to get to know you (this is a project of 11 months of work) and I would like you to tell me in Issues tab or Discussion tab what you think and if you see any utility in https://github.com/Leci37/stocks-prediction-Machine-learning-RealTime-telegram#possible-improvements. \n\n#### 5 Predictions\n##### **5.0** make predictions of the last week Optional Test \nRun `Model_predictions_Nrows.py`\n\nAt this point the **file** `realtime_model_POOL_driver.py` **is required**, you must **ask for it** \n\nThis run generates the log file *d_result/prediction_results_N_rows.csv*\nGenerates a sample file with predictions for the last week, data obtained with yfinance. \nCheck that records exist \n\n\n##### **5.1** Getting OHLCV data in real time\nIn case you want to predict actions in the @FOLO3 list, ignore this point. \n\nIt is difficult to get real time OHLCV, especially volume (yfinance gives real time volume, but this is not a correct value and after 1-2 hours it changes, making it unfeasible to use yfinance for real time predictions).\n\nTo get correct volumes in real time, queries are made to webull, for each stock every 2.5 minutes, a webull ID is required, the default ones @FOLO3 are cached and downloaded in *a_manage_stocks_dict.py. DICT_WEBULL_ID*\n\nBut if you want to use actions outside the list @FOLO3 \n\nIn Utils/Volume_WeBull_get_tikcers.py\n\nChange the example list:\n```\nlist_stocks = [\"NEWS\", \"STOCKS\", \"WEBULL\", \"IDs\"]\n```\nBy the nasdaq ticker, of the webull ID you want to get.\n\nRun Utils/Volume_WeBull_get_tikcers.py\n\nOnce executed it will show a list on screen, that must be added in *a_manage_stocks_dict.py.DICT_WEBULL_ID*\n```\n\"MELI\" : 913323000,\n\"TWLO\" : 913254000,\n```\n\n##### **5.2** Setting up chatIDs and tokens in Telegram\nYou have to get the telegram token and create a channel. \n\nYou can get the token by following the tutorial: [https:](https://www.siteguarding.com/en/how-to-get-telegram-bot-api-token)//www.siteguarding.com/en/how-to-get-telegram-bot-api-token \n\nWith the token update the variable of ztelegram_send_message_handle.py\n``` python\n#Get from telegram\nTOKEN = **\"00000000xxxxxxx\"**\n```\nOnce the token has been obtained, the chatId of the users and administrator must be obtained. \n\nUsers only receive purchase and startup sale alerts, while the administrator receives alerts from users as well as possible problems.\n\nTo get the chatId of each user run ztelegram_send_message_UptateUser.py and then write any message to the bot, the chadID appears both in the console and in the user's chadID \n```\n*[\u003e\u003e\u003e BOT] Message Send on 2022-11-08 22:30:31:31*\n`\t`*Text: You \"User nickname \" send me:* \n*\"Hello world\"*\n` `*ChatId: \"5058733760\".*\n`\t`*From: Bot name*\n`\t`*Message ID: 915*\n`\t`*CHAT ID: 500000760*\n*-----------------------------------------------*\nPick up *CHAT ID: 500000760*\n```\nWith the chatId of the desired users, add them to the LIST_PEOPLE_IDS_CHAT list.\n\nin ztelegram_send_message_handle.py\n\n\n##### **5.3** Sending real-time alerts Telegram\nIt is possible to run it without configuring telegram, in that case no alerts will be sent in telegram, but the results will be recorded in real time in: *d_result/prediction_real_time.csv*\n\nIt will be reported in console via: \n\n`is_token_telegram_configurated()` - Results will be recorded in real time, but no alert will be sent on telegram. File: *d_result/prediction_real_time.csv*\n\n`is_token_telegram_configurated()` - There is no value for the telegram TOKEN, telegram is required to telegram one*\n\nThe criteria to send alert or not is defined in the method ztelegram_send_message.will_send_alert(). If more than half of the models have a score greater than 93% or the TF models have a score greater than 93%, an alert is sent to the consumer users. \n\nRun `5_predict_POOL_enque_Thread.py`\n\nIn this class there are 2 types of threads \n\n- Producer , constantly asks for OHLCV data, once it is obtained, it enters it into a queue. \n- Consumer (2 threads running simultaneously) are pulling OHLCV data from the queue, calculating technical parameters, making model predictions, registering them in zTelegram_Registers.csv, and if they meet the requirements they are sent by telegram. \n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/leci37)\n\n\n## **Possible improvements:**\n##### Combine the power of the 17 models\nwould be to combine the power of the 17 models tested at  https://github.com/huseinzol05/Stock-Prediction-Models predictive models with https://github.com/Leci37/stocks-Machine-learning-RealTime-telegram/tree/develop real-time pattern calculation and alerting capabilities.\nShould be implemented in the method `train_model_with_custom_columns(name_model, columns_list, csv_file_SCALA, op_buy_sell : a_manage_stocks_dict.Op_buy_sell):`\nFor multidimension branch: `get_dicts_models_multi_dimension(self). `\n\nanother interesting improvement is the addition of PYTORCH, is the tensor flow \"competence\". \n\n##### Better use tuners\nEven if the testing of the 17 models improves the result , the ML libraries, offer **_\"tuners\"_**, tools that test all desired combinations and turn the ideal configuration for that data. For tensor flow, see https://www.tensorflow.org/tutorials/keras/keras_tuner \nIn the project there are several intents of use: `Model_finetune_TF.py`, `Model_finetune_TF_2.py` and `Model_finetune_XGB.py`. \nRunning the \"tuners\" code is very heavy on the computer. \nYou can add more models (the 17 for example) and tune them with keras_tuner.\nExample of the multiple values that keras_tuner allows: \n``` python\nneurons = [2, 4,8,16,24,28,32,32,44,52,64,92,92]]\nweight_constraint = [1.0, 3.0, 4.0, 5.0, 7.0]\ndropout_rate = [0.0, 0.1, 0.2, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]\nhp_learning_rate = hp.Choice('learning_rate', values=[1e-2, 1e-3, 1e-4, 1e-5])\nparam_grid = dict(model__dropout_rate=dropout_rate, model__weight_constraint=weight_constraint, model__neurons=neurons).\nmodel = KerasClassifier(model=create_model_2, epochs=100, batch_size=10, verbose=2)\n```\nMore information:\nhttps://www.simplilearn.com/tutorials/deep-learning-tutorial/keras-tuner and \nhttps://machinelearningmastery.com/grid-search-hyperparameters-deep-learning-models-python-keras/\n\n##### Real-time alert with .png financial data\n\nYou can add to the alerts the summary of the financial information from TraderView.com, this image will always be loaded with the financial-analyst information in real time.  \nImage is generated by code `__create_find_data_png_trader_view(path_png + \"_TRAVIEW_finan.png\")`\n\nExample of summary:\n\n![](readme_img/RIVN_TRAVIEW_finan.png)\n\n\n##### Improvements in predictive models using multi-dimensional \n**Solved**  _Note 29-December 2022_  in _stocks-prediction-multi_ branch (ask for it without any problem).\nImprovements in TF predictive models using tensors (multiple matrices over time) and non-matrices (mono temporal, current design). \n\nIn the class `Model_TF_definitions.ModelDefinition.py`\n\nThrough it, the model configurations, density, number of neurons, etc. are obtained.\n\nThere are two methods:\n\n- `get_dicts_models_One_dimension()` is currently used and generates TF model configurations for arrays. \n- `get_dicts_models_multi_dimension()` is not in use, it is set to give multiple model configurations using tensors. \n\nThere is the `Utils.Utils_model_predict.df_to_df_multidimension_array(dataframe, BACHT_SIZE_LOOKBACK)` method, which transforms 2-dimensional df [columns , rows] to 3-dimensional df [columns , files, BACHT_SIZE_LOOKBACK ].\n\nBACHT_SIZE_LOOKBACK means how many records in the past tense are added to the df, the number is configurable and default value is eight.\n\nTo start the development must be to call the method with BACHT_SIZE_LOOKBACK with an integer value, the method will return a multidimensional df [columns, files, BACHT_SIZE_LOOKBACK ], with which to feed the TF models.\n\nUtils_model_predict.scaler_split_TF_onbalance(df, label_name=Y_TARGET, BACHT_SIZE_LOOKBACK=8)\n\n\n\n**Improvement**: Once these multidimensional arrays are returned, models are obtained with `get_dicts_models_multi_dimension()`, it is not possible to train a model and make a prediction with multidimensional arrays. \n\n##### Review the way ground true is obtained \nIt is recommended to review the point \"Ground True is the variable\" of the documentation, to understand this point.\n\nBefore training the models the intervals (of 15min) are classified as buy point 100 or 101, sell point -100 or .-101 or no trade point 0, these values are entered in the column Y_TARGET = **'buy_sell_point'** through the method `Utils.Utils_buy_sell_points.get_buy_sell_points_Roll()`.  \n\nThe variation is calculated with respect to the following 12 windows (15min \\* 12 = 3 hours), and from there the 8% points of greatest rise and greatest fall are obtained, and these points are assigned values other than 0.\n\nTo obtain the Y_TARGET there are 2 methods that are responsible for the strategy to follow once you buy and sell, in case of loss will opt for Stop Loss.\n\n`rolling_get_sell_price_POS()` and `rolling_get_sell_price_NEG()`\n\n**Optional improvement**: the current system decides by percentages, i.e. the 16% highest rises and falls (8% each) are ground true. I.e. there are rises or falls greater than 3% that can be left out if the stock is very volatile.\n\n##### For unbalanced classes, you should look at the F1-score\nFor unbalanced classes, you should look at the f1-score indicator https://datascience.stackexchange.com/questions/105089/how-f1-score-is-good-with-unbalanced-dataset  \nWhat we are trying to achieve with the F1-score metric is to find an equal balance between precision and recall, which is extremely useful in most scenarios when we are working with imbalanced datasets (i.e., a dataset with a non-uniform distribution of class labels). \nA model with high recall but low precision score returns many positive results, but most of its predicted labels are incorrect when compared to the ground truth.\nOn the other hand, a model with high precision but low recall score returns very few results, but most of its predicted labels are correct when compared to the ground-truth. \nAn ideal scenario would be a model with high precision and high recall, meaning it will return many results, with all results labelled correctly. Unfortunately, in most cases, precision and recall are often in tension. \n\n#####  Review the free code winners of KAGGLE \nReview the free code of people who have been in the top10 winners of kaggle, the championship models teach a lot.\nAt the moment I'm inspired by the 3rd place of the \"price of the house in paris\", it's data from .csv and unbalanced https://www.kaggle.com/code/viktortaran/ps-s-3-e-6?scriptVersionId=119565159\u0026cellId=129  \n( it's hard to find them most of the winners in kaggle don't publish in open) \nFor more CHAMPIONSHIP notebooks:\nhttps://ndres.me/kaggle-past-solutions/  \nhttps://www.kaggle.com/code/sudalairajkumar/winning-solutions-of-kaggle-competitions \n\n##### Are 3 GrounsTrue detection tags sufficient or are subclasses required? \nHow do you know that GrounsTrue **clustering** (_buy, sell, nothing_) is similar and correct? Is it necessary to cluster with **more labels** (_buy_A, sell_A , nothing_A, buy_B, sell_B , nothing_B, buy_C, sell_C_)? How do I know the number of tags needed ?\nTo solve this question you can use the \"K-means Clustering\" https://neptune.ai/blog/clustering-algorithms\n\n\u003cimg src=\"readme_img/kmeans_clustering.gif\" alt=\"kmeans_clustering\" width=\"400\"/\u003e\n\n##### Remove columns that have more than 0.9 correlation between them\nRemove columns that have more than 0.9 correlation between them, as they **are redundant**. Inside the method \n```python \nuncorrelate_selection(features_X_ALL, num_features=NUMS_FEATURES, split_ratio=SPLIT_RATIO_X_Y, column_path=f'data/columns_select/{symbol}_{REF_MODEL}.pkl')\n    # Look for the next line and try the correction \n    # Get the correlation table\n    corr = train_data.corr()\n```\nMore info help: https://machinelearningmastery.com/basic-data-cleaning-for-machine-learning/ \n\n\n##### Architecture to Reinforcement Learning\nAnother way to get a rebuild of the GT, is to change the architecture to Reinforcement Learning RL, which has the feature of not using GT, **it learns after many trial and error attempts**.\nThere are three types of trades buy, sell or hold. the RL randomly tests them, collects results, and learns from the failures, when it is correct to buy, sell or hold.\n\n\u003cimg src=\"readme_img/ex_TF_RL.png\" alt=\"ex_TF_RL\" width=\"400\"/\u003e\n\nThe main project that uses RL is https://github.com/AI4Finance-Foundation/FinRL.\nEspecially the tutorial to make RL with OHLCV data and 2 technical patterns. https://github.com/AI4Finance-Foundation/FinRL/blob/master/examples/Stock_NeurIPS2018_SB3.ipynb \n\nThat project does not have good tools for real time data collection, alert system, it also works with daily OHLCV data (instead of the intra day 5min, 15min, 1h of this project), which leaves you very exposed to news and financial results. \n\nTo start getting familiar with this POWERFUL tool, we recommend the following tools and tutorials\n- From 0 : https://gymnasium.farama.org/tutorials/training_agents/blackjack_tutorial/ \n- Beginner: https://github.com/AminHP/gym-anytrading \n- Intermediate-advanced: https://github.com/AminHP/gym-mtsim \n- Professional: https://github.com/AI4Finance-Foundation/FinRL\n\n##### MonoLabel vs MultiLabel\nThe models are binary, i.e., some POS models are generated to detect only points of purchase and other NEG to detect only points of sale, these predictive models only detect True or False.\n\n  You can try to add a multi-label detection, this would translate into Buy, Sell, Nothing preconditions. \nHint: look for ` activation='sigmoid'` and implement https://stackoverflow.com/questions/55936546/binary-and-multi-class-classification-code-change \n\n#####  Show TF heat map of the detected decison \nWhen making TF image predictions, it provides the **_heat map_**, i.e., what pixels it looked at to make the decision.\nWhich of the technical patterns provided (in 3d array format)? \nforming the heat map, of the given preconditions \nExample for TF cat detection:\n\n\u003cimg src=\"readme_img/ex_TF_cat_heat_map.jpg\" alt=\"ex_TF_cat_heat_map\" width=\"400\"/\u003e\n\nSearch for better correlations strength  https://gmarti.gitlab.io/ml/2019/10/13/tf-dcgan-financial-correlation-matrices.html \n\n##### Use benefit evaluation function instead of Y target\nInstead of using the ground true, i.e. the objective \"y\", it can be disguised, i.e. at each step of the training it is not evaluated against the \"y\" but against the function \"benefit obtained\" (which would have to be created). \nFor this it is necessary to create callback decorators in the training function like https://www.tensorflow.org/guide/keras/customizing_what_happens_in_fit?hl=es-419#wrapping_up_an_end-to-end_gan_example \n\n\n##### Imagine the operating points (generative adversarial networks) \n\nThis is the strangest improvement, and the one that makes me **_most curious_**\n\nTensor Flow allows to create fictitious images by means of the system of **_two neural networks fighting_** (one neural network \"artist\" and the other \"critic\"). The artist creates small modifications and the critic tells him to go closer or farther away. \nThis tactic is called **_GAN (generative adversarial networks)_**\nhttps://www.tensorflow.org/tutorials/generative/dcgan [ Example of real time creation of fictional anime GAN images](https://github.com/BaoLocPham/TensorFlow-Advanced-Techniques-Specialization/blob/main/MOOC%204%20-%20Generative%20Deep%20Learning%20with%20TensorFlow/week%203%20-%20Variational%20Auto%20Encoder/vea-anime-anim.gif )\n \n\u003cimg src=\"https://www.tensorflow.org/tutorials/generative/images/gan2.png?hl=es-419\" width=\"400\"/\u003e\n\n\n\nThe multidimensional training data of the _stocks-prediction-multi_  branch, are 3d arrays (a .png .jpg ... is also a 3d array), with that data you can create the fight between \"artist\" and \"critic\". \nThis totally changes the way of preceding, \n currently you collect data and ask the TF model, is it a point of buying and selling? \nWith this change, it works like:\n1. TF model receives a request \"generate-imagine\" buying points\n1. TFmodel returns **_many fictional_** arrays3d\n1. when in real time appears an array3d similar to the imagined one, the buy-sell alert is launched.\n\n\n##### Testing the MachineLearning platforms of large IT companies \n\nOnce you have obtained the history (example named _GOOG_PLAIN_stock_history_MONTH_3.csv_) with the technical patterns of the stock you can try using the prediction services of the big IT companies:  \n1. Google: https://cloud.google.com/vertex-ai/docs/beginner/beginners-guide \n2. Microsotf Azure: https://learn.microsoft.com/es-es/azure/machine-learning/how-to-use-automated-ml-for-ml-models\n3. AWS: https://aws.amazon.com/es/getting-started/hands-on/machine-learning-tutorial-automatically-create-models/ \n\n_**Usage experience:**_\nDic-2022 (Azure and Google allow you to export locally from model and make predictions locally without relying on the clouds, AWS for the moment forces you to make predictions in their cloud, making the cost of maintenance much more expensive (I have not tested AWS in depth for that reason).\nAzure takes a lot of time (more than 15h)  tests many more models, many fail and you have to pay for the time it takes to fail. \n`ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm).`\n\n_**Google**_ goes faster, but does not support for the moment any result better than the one obtained locally.\n\n![](readme_img/google_nube_1.PNG)\n![](readme_img/google_nube_2.PNG) ![](readme_img/google_nube_3.PNG)\n\nBoth allow you to easily download the models created, **_Azure_** with .py files for guidance. \n\n![](readme_img/azure_nube_1.PNG)\n\nMore models, more power Azure, it is also more expensive.\n\n\n\n##### Add news sentiment indicator\nYou get the news for each stock with `news_get_data_NUTS.get_news_sentiment_data()` this method gets all the associated news from: INVESTING.com, YAHOO.com and FINVIZ.COM.\n\nNews is obtained from yahoo and finviz.com, (see file https://github.com/Leci37/TensorFlow-stocks-prediction-Machine-learning-RealTime/blob/master/news_sentiment/news_get_data_NUTS.py ) **NO NEWS FROM TWITTER** in this version, just publish result on it.\nWhile news are obtained, the news are not valued by the TensorFlow models as of today. (providers with little and poor data).\n\n( it uses investpy API , which recently october 2022 has started to fail , probably due to investing[.com](https://github.com/alvarobartt/investpy) blocking \u003chttps://github.com/alvarobartt/investpy\u003e )\n\nOnce these news items are obtained, the method `news_sentiment_va_and_txtBlod.get_sentiment_predictorS()` proceeds to evaluate and score from -100 negative to 100 positive, using 4 models. It is convenient to introduce more news pages\n\nThe models are downloaded from the internet, either via AI models or libraries, you can find the references in:\n```\nnews_sentiment_flair.get_sentiment_flair\nnews_sentiment_t5.get_sentiment_t5\nnews_sentiment_t5.get_sentiment_t5Be\nget_sentiment_textBlod\n```\nRun `news_get_data_NUTS.get_json_news_sentimet()`\n\nA .csv and .json file is generated, with action date the four models, the score and the news collected Example: *d_sentiment/stock_news_DATE_MELI.csv*\n\n![](readme_img/Aspose.Words.b41e3638-ef34-4eaa-ac86-1fda8999e934.010.png)\n\n**Improvement**: Once the sentiment-news score file is obtained, introduce it in the predictive models together with the technical indicators, it must be done in real time.\n\n\n##### Add balance sheets\nEconomic balances can be added easily using the yahoo API\n\n\u003chttps://github.com/ranaroussi/yfinance\u003e\n\n\\# show financials\n```\nmsft.financials\nmsft.quarterly_financials\n```\nThese balances are updated every quarter.\n\nYou can get the dates of publication of results in yahoo API\n\n\\# show next event (earnings, etc)\n```\nmsft.calendar\n```\n\\# show all earnings dates\n```\nmsft.earnings_dates\n```\n#####  Recommended reading LSTM plus stock price FAIL\nThis does not understand the principle of self-fulfilling prophecy (explained at the beginning), but it is worth considering. \n_LSTM time series + stock price prediction = FAIL_ \n[https://www.kaggle.com/code/carlmcbrideellis/lstm-time-series-stock-price-prediction-fail ](https://www.kaggle.com/code/carlmcbrideellis/lstm-time-series-stock-price-prediction-fail)\n\n##### Review of all forms of time series prediction: lstm,gru,cnn and rnn\nLaurence Moroney has extensive tutorials in his book on how to correctly make temporary preditions (LSTM; GRU; RNN; CNN; ). https://github.com/lmoroney/tfbook/tree/master/chapter11 \n\nA good google brain tutorial Laurence Moroney  https://github.com/MoRebaie/Sequences-Time-Series-Prediction-in-Tensorflow/blob/master/Course_4_Week_4_Exercise_Question.ipynb \n\n##### Lighter improvements list of suggested\n\nAllow to analyze stocks outside the nasdaq, change in :\n\n`yhoo_history_stock._select_dowload_time_config()`\n\nUtils/API_alphavantage_get_old_history.py\n\nRedirect remaining `print()` to `Logger.logr.debug()`\n\nTranslate through \u003chttps://www.deepl.com/\u003e the possible remaining messages in Spanish to English. \n\nThe plots generated in the *plots_relations/plot* folder by \n\nChange the operation of the bot, that is enough to send the command `\\start`, and remove the case of execution of `ztelegram_send_message_UptateUser.py` described in point: 5.2\n\nSend real time email alert\n\nRevise Stock prediction fail LSTM , **Solved** in _stocks-prediction-multi_ branch\n\nFind the explanation of what indicators and values the AI model takes, to predict what it predicts and give a small explanation-schema, for example random forest models if you can print the sequence that makes the prediction. \n\n(green buy, red do not trade) https://stackoverflow.com/questions/40155128/plot-trees-for-a-random-forest-in-python-with-scikit-learn \n\n![](readme_img/Aspose.Words.b41e3638-ef34-4eaa-ac86-1fda8999e934.011.png)\n\n### Instructions for final user\n- RealTime Twitter https://twitter.com/Whale__Hunters\n\n- RealTime Telegram @Whale_Hunter_Alertbot this group is limited, to receive alert to sign up  ask via github or twitter \n\nThe models have been trained in **_15 min_** intervals with , i.e. the alerts expire in about 7 minutes, that means that once the tweet goes out, you have +-7 minutes to decide whether to trade or not. also that the models should be used on intra-day trade._Never blindly follow the alerts, check first_. \nThe alerts indicate points where **_only technical patterns have brought strong trend changes_** in the last 5 months, i.e. if these models were applied to the last 5 months they would hit 91% of the BUY SELL points, in the future no one can know. \nIn other words, it is not an absolute truth.\n\nThe alerts are designed **for INTRADAY operations**, for the moment only with technical patterns, that is to say at the end of the day it is recommended to close them, in the future no one can know.\n\n##### The alert consists of the following:\n- Can be _**BUY**_ or _**SELL**_.\n- The id  of the stock, always from the USA market, in case of crypto will have the termination **_-USD_**. In case of Tesla, it is TSLA, in case of doubt with the company id , a simple google search \"_Stocks XXX_\".\n- Link to _**Investing.com**_ news, check before making the final decision.\n- Link to the candlesticks through _**TraderView.com**_, is the image shown attached with the alert. \n- 𝙈𝙤𝙙𝙚𝙡 𝙏𝙧𝙪𝙨𝙩:⬆⬇, level of strength indicating whether there is a positive or negative trend and behind / number of models used to obtain the percentage. \nIt may be the case that both the uptrend POS and downtrend NEG have a high score, indicating increased volatility.\n- 📊⚙𝙉𝙖𝙢𝙚𝙨:\nThe name of the selected models with which the prediction has been made and the percentage of strength. \n\n###### Example of how the alerts looks like in **Twitter**:\n![](readme_img/tweet_image.PNG \"tweet_image\")\n\n###### Example of how the alerts looks like in **Telegram**:\n\n![](readme_img/telegram_bot_alert_example_2.0.jpg )\n\n### Program Description {OLD}\n\n**OHLCV** :An opening-high-low-closing-volume chart is a type of chart that is typically used to illustrate movements in the price of a financial instrument over time.\n\n**Functions:**\n\n1. Collection of historical **stocks** OHLCV data for the last years and calculation of technical patterns (momentums, volatility, Japanese candlesticks, statistics...), 1068 patterns.\n1. Calculations of which of the 1068 are the most valuable, and most relevant for the detection of good trading points (buy-sell).\n1. Training of several machine learning models using powerful libraries:Google Tensor Flow Sklearn and XGB\n1. Evaluation of the multiple models, to discard the less reliable ones. \n1. OHLCV data collection and making predictions from the models in real time, when any of the multiple predictions (buy-sell stocks) is considered valid, sending real-time alert to Telegram and Mail. \n\n_**Remember**_ the scalability of the project, it receives OHLCV data but can _**receive any type of data in .csv or excel**_ for predictions, with few changes (check the structure), it would be nice to complete the development so that it can receive predictions of any type, with open source. I am willing to help. \nThe predictive models generated by the solution are **_binary_**, i.e. they detect True or False.\n\nSee article in **medium.com** https://medium.com/@LuisCasti33/lectrade-machine-learning-with-technical-patterns-and-real-time-alerts-for-buying-and-selling-in-b4ecc59b29cb\n\n\n\n\n\n#### USE THE SOFTWARE AT YOUR OWN RISK THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS\nUSE THE SOFTWARE AT YOUR OWN RISK THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS. Do not risk money which you are afraid to lose. There might be bugs in the code - this software DOES NOT come with ANY warranty.\nPermitted, free use and modification, but no commercialization to third parties, without authorization. All rights reserved. Improvements or changes by third parties must be notified\n\n#### Technical Patterns all Names\n\n**ALL technical indicators** in python you can find here, look the funtion extract_features(df: pd.DataFrame,extra_columns =False,  shift=150, debug=False) inside https://github.com/Leci37/TensorFlow-stocks-prediction-Machine-learning-RealTime/blob/master/features_W3_old/v3.py some of the technical indicators take future data, be careful.\n\nAll patterns used \n```\nDate\tbuy_sell_point\tOpen\tHigh\tLow\tClose\tVolume\tper_Close\tper_Volume\thas_preMarket\n  per_preMarket\tolap_BBAND_UPPER\tolap_BBAND_MIDDLE\tolap_BBAND_LOWER\tolap_BBAND_UPPER_crash\t\n  olap_BBAND_LOWER_crash\tolap_BBAND_dif\tolap_HT_TRENDLINE\tolap_MIDPOINT\tolap_MIDPRICE\tolap_SAR\t\n  olap_SAREXT\tmtum_ADX\tmtum_ADXR\tmtum_APO\tmtum_AROON_down\tmtum_AROON_up\tmtum_AROONOSC\tmtum_BOP\t\n  mtum_CCI\tmtum_CMO\tmtum_DX\tmtum_MACD\tmtum_MACD_signal\tmtum_MACD_list\tmtum_MACD_crash\tmtum_MACD_ext\n  mtum_MACD_ext_signal\tmtum_MACD_ext_list\tmtum_MACD_ext_crash\tmtum_MACD_fix\tmtum_MACD_fix_signal\t\n  mtum_MACD_fix_list\tmtum_MACD_fix_crash\tmtum_MFI\tmtum_MINUS_DI\tmtum_MINUS_DM\tmtum_MOM\t\n  mtum_PLUS_DI\tmtum_PLUS_DM\tmtum_PPO\tmtum_ROC\tmtum_ROCP\tmtum_ROCR\tmtum_ROCR100\t\n  mtum_RSI\tmtum_STOCH_k\tmtum_STOCH_d\tmtum_STOCH_kd\tmtum_STOCH_crash\tmtum_STOCH_Fa_k\t\n  mtum_STOCH_Fa_d\tmtum_STOCH_Fa_kd\tmtum_STOCH_Fa_crash\tmtum_STOCH_RSI_k\tmtum_STOCH_RSI_d\t\n  mtum_STOCH_RSI_kd\tmtum_STOCH_RSI_crash\tmtum_TRIX\tmtum_ULTOSC\tmtum_WILLIAMS_R\tvolu_Chaikin_AD\nvolu_Chaikin_ADOSC\tvolu_OBV\tvola_ATR\tvola_NATR\tvola_TRANGE\tcycl_DCPERIOD\tcycl_DCPHASE\t\ncycl_PHASOR_inph\tcycl_PHASOR_quad\tcycl_SINE_sine\tcycl_SINE_lead\tcycl_HT_TRENDMODE\tcdl_2CROWS\t\ncdl_3BLACKCROWS\tcdl_3INSIDE\tcdl_3LINESTRIKE\tcdl_3OUTSIDE\tcdl_3STARSINSOUTH\tcdl_3WHITESOLDIERS\t\ncdl_ABANDONEDBABY\tcdl_ADVANCEBLOCK\tcdl_BELTHOLD\tcdl_BREAKAWAY\tcdl_CLOSINGMARUBOZU\t\ncdl_CONCEALBABYSWALL\tcdl_COUNTERATTACK\tcdl_DARKCLOUDCOVER\tcdl_DOJI\tcdl_DOJISTAR\t\ncdl_DRAGONFLYDOJI\tcdl_ENGULFING\tcdl_EVENINGDOJISTAR\tcdl_EVENINGSTAR\tcdl_GAPSIDESIDEWHITE\t\ncdl_GRAVESTONEDOJI\tcdl_HAMMER\tcdl_HANGINGMAN\tcdl_HARAMI\tcdl_HARAMICROSS\tcdl_HIGHWAVE\ncdl_HIKKAKE\tcdl_HIKKAKEMOD\tcdl_HOMINGPIGEON\tcdl_IDENTICAL3CROWS\tcdl_INNECK\tcdl_INVERTEDHAMMER\ncdl_KICKING\tcdl_KICKINGBYLENGTH\tcdl_LADDERBOTTOM\tcdl_LONGLEGGEDDOJI\tcdl_LONGLINE\t\ncdl_MARUBOZU\tcdl_MATCHINGLOW\tcdl_MATHOLD\tcdl_MORNINGDOJISTAR\tcdl_MORNINGSTAR\tcdl_ONNECK\t\ncdl_PIERCING\tcdl_RICKSHAWMAN\tcdl_RISEFALL3METHODS\tcdl_SEPARATINGLINES\tcdl_SHOOTINGSTAR\ncdl_SHORTLINE\tcdl_SPINNINGTOP\tcdl_STALLEDPATTERN\tcdl_STICKSANDWICH\tcdl_TAKURI\ncdl_TASUKIGAP\tcdl_THRUSTING\tcdl_TRISTAR\tcdl_UNIQUE3RIVER\tcdl_UPSIDEGAP2CROWS\ncdl_XSIDEGAP3METHODS\tsti_BETA\tsti_CORREL\tsti_LINEARREG\tsti_LINEARREG_ANGLE\tsti_LINEARREG_INTERCEPT\t\nsti_LINEARREG_SLOPE\tsti_STDDEV\tsti_TSF\tsti_VAR\tma_DEMA_5\tma_EMA_5\tma_KAMA_5\tma_SMA_5\tma_T3_5\tma_TEMA_5\nma_TRIMA_5\tma_WMA_5\tma_DEMA_10\tma_EMA_10\tma_KAMA_10\tma_SMA_10\tma_T3_10\tma_TEMA_10\tma_TRIMA_10\nma_WMA_10\tma_DEMA_20\tma_EMA_20\tma_KAMA_20\tma_SMA_20\tma_T3_20\tma_TEMA_20\tma_TRIMA_20\tma_WMA_20\nma_DEMA_50\tma_EMA_50\tma_KAMA_50\tma_SMA_50\tma_T3_50\tma_TEMA_50\tma_TRIMA_50\tma_WMA_50\t\nma_DEMA_100\tma_EMA_100\tma_KAMA_100\tma_SMA_100\tma_T3_100\tma_TEMA_100\tma_TRIMA_100\tma_WMA_100\ttrad_s3\ttrad_s2\ttrad_s1\t\ntrad_pp\ttrad_r1\ttrad_r2\ttrad_r3\tclas_s3\tclas_s2\tclas_s1\tclas_pp\tclas_r1\tclas_r2\tclas_r3\tfibo_s3\tfibo_s2\tfibo_s1\tfibo_pp\tfibo_r1\nfibo_r2\tfibo_r3\twood_s3\twood_s2\twood_s1\twood_pp\twood_r1\twood_r2\twood_r3\tdemark_s1\tdemark_pp\tdemark_r1\tcama_s3\tcama_s2\ncama_s1\tcama_pp\tcama_r1\tcama_r2\tcama_r3\tti_acc_dist\tti_chaikin_10_3\tti_choppiness_14\tti_coppock_14_11_10\nti_donchian_lower_20\tti_donchian_center_20\tti_donchian_upper_20\tti_ease_of_movement_14\tti_force_index_13\nti_hma_20\tti_kelt_20_lower\tti_kelt_20_upper\tti_mass_index_9_25\tti_supertrend_20\tti_vortex_pos_5\nti_vortex_neg_5\tti_vortex_pos_14\tti_vortex_neg_14\tcycl_EBSW_40_10\tmtum_AO_5_34\tmtum_BIAS_SMA_26\nmtum_AR_26\tmtum_BR_26\tmtum_CFO_9\tmtum_CG_10\tmtum_CTI_12\tmtum_DMP_14\tmtum_DMN_14\tmtum_ER_10\nmtum_BULLP_13\tmtum_BEARP_13\tmtum_FISHERT_9_1\tmtum_FISHERTs_9_1\tmtum_INERTIA_20_14\tmtum_K_9_3\tmtum_D_9_3\tmtum_J_9_3\nmtum_PGO_14\tmtum_PSL_12\tmtum_PVO_12_26_9\tmtum_PVOh_12_26_9\tmtum_PVOs_12_26_9\tmtum_QQE_14_5_4236_RSIMA\t\nmtum_QQEl_14_5_4236\tmtum_QQEs_14_5_4236\tmtum_RSX_14\tmtum_STC_10_12_26_05\tmtum_STCmacd_10_12_26_05\t\nmtum_STCstoch_10_12_26_05\tmtum_SMI_5_20_5\tmtum_SMIs_5_20_5\tmtum_SMIo_5_20_5\tolap_ALMA_10_60_085\tolap_HWMA_02_01_01\t\nolap_JMA_7_0\tolap_MCGD_10\tolap_PWMA_10\tolap_SINWMA_14\tolap_SSF_10_2\tolap_SWMA_10\tolap_VMAP\tolap_VWMA_10\t\nperf_CUMLOGRET_1\tperf_CUMPCTRET_1\tperf_z_30_1\tperf_ha\tsti_ENTP_10\tsti_KURT_30\tsti_TOS_STDEVALL_LR\tsti_TOS_STDEVALL_L_1\t\nsti_TOS_STDEVALL_U_1\tsti_TOS_STDEVALL_L_2\tsti_TOS_STDEVALL_U_2\tsti_TOS_STDEVALL_L_3\tsti_TOS_STDEVALL_U_3\t\nsti_ZS_30\ttend_LDECAY_5\ttend_PSARl_002_02\ttend_PSARs_002_02\ttend_PSARaf_002_02\ttend_PSARr_002_02\ttend_VHF_28\t\nvola_HWM\tvola_HWU\tvola_HWL\tvola_KCLe_20_2\tvola_KCBe_20_2\tvola_KCUe_20_2\tvola_RVI_14\tvola_THERMO_20_2_05\nvola_THERMOma_20_2_05\tvola_THERMOl_20_2_05\tvola_THERMOs_20_2_05\tvola_TRUERANGE_1\tvola_UI_14\tvolu_EFI_13\t\nvolu_NVI_1\tvolu_PVI_1\tvolu_PVOL\tvolu_PVR\tvolu_PVT\tmtum_murrey_math\tmtum_td_seq\tmtum_td_seq_sig\ttend_hh\t\ntend_hl\ttend_ll\ttend_lh\ttend_hh_crash\ttend_hl_crash\ttend_ll_crash\ttend_lh_crash\tichi_tenkan_sen\tichi_kijun_sen\t\nichi_senkou_a\tichi_senkou_b\tichi_isin_cloud\tichi_crash\tichi_chikou_span\ttend_renko_TR\ttend_renko_ATR\t\ntend_renko_brick\ttend_renko_change\tpcrh_trad_s3\tpcrh_trad_s2\tpcrh_trad_s1\tpcrh_trad_pp\tpcrh_trad_r1\t\npcrh_trad_r2\tpcrh_trad_r3\tpcrh_clas_s3\tpcrh_clas_s2\tpcrh_clas_s1\tpcrh_clas_pp\tpcrh_clas_r1\t\npcrh_clas_r2\tpcrh_clas_r3\tpcrh_fibo_s3\tpcrh_fibo_s2\tpcrh_fibo_s1\tpcrh_fibo_pp\tpcrh_fibo_r1\t\npcrh_fibo_r2\tpcrh_fibo_r3\tpcrh_wood_s3\tpcrh_wood_s2\tpcrh_wood_s1\tpcrh_wood_pp\tpcrh_wood_r1\t\npcrh_wood_r2\tpcrh_wood_r3\tpcrh_demark_s1\tpcrh_demark_pp\tpcrh_demark_r1\tpcrh_cama_s3\tpcrh_cama_s2\t\npcrh_cama_s1\tpcrh_cama_pp\tpcrh_cama_r1\tpcrh_cama_r2\tpcrh_cama_r3\tmcrh_DEMA_5_DEMA_10\tmcrh_DEMA_5_EMA_10\t\nmcrh_DEMA_5_KAMA_10\tmcrh_DEMA_5_SMA_10\tmcrh_DEMA_5_T3_10\tmcrh_DEMA_5_TEMA_10\tmcrh_DEMA_5_TRIMA_10\t\nmcrh_DEMA_5_WMA_10\tmcrh_DEMA_5_DEMA_20\tmcrh_DEMA_5_EMA_20\tmcrh_DEMA_5_KAMA_20\tmcrh_DEMA_5_SMA_20\tmcrh_DEMA_5_T3_20\t\nmcrh_DEMA_5_TEMA_20\tmcrh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crh_DEMA_10_WMA_50\tmcrh_DEMA_10_DEMA_100\tmcrh_DEMA_10_EMA_100\t\nmcrh_DEMA_10_KAMA_100\tmcrh_DEMA_10_SMA_100\tmcrh_DEMA_10_T3_100\tmcrh_DEMA_10_TEMA_100\tmcrh_DEMA_10_TRIMA_100\t\nmcrh_DEMA_10_WMA_100\tmcrh_DEMA_10_ti_h20\tmcrh_EMA_10_DEMA_20\tmcrh_EMA_10_EMA_20\tmcrh_EMA_10_KAMA_20\tmcrh_EMA_10_SMA_20\t\nmcrh_EMA_10_T3_20\tmcrh_EMA_10_TEMA_20\tmcrh_EMA_10_TRIMA_20\tmcrh_EMA_10_WMA_20\tmcrh_EMA_10_DEMA_50\tmcrh_EMA_10_EMA_50\t\nmcrh_EMA_10_KAMA_50\tmcrh_EMA_10_SMA_50\tmcrh_EMA_10_T3_50\tmcrh_EMA_10_TEMA_50\tmcrh_EMA_10_TRIMA_50\tmcrh_EMA_10_WMA_50\t\nmcrh_EMA_10_DEMA_100\tmcrh_EMA_10_EMA_100\tmcrh_EMA_10_KAMA_100\tmcrh_EMA_10_SMA_100\tmcrh_EMA_10_T3_100\t\nmcrh_EMA_10_TEMA_100\tmcrh_EMA_10_TRIMA_100\tmcrh_EMA_10_WMA_100\tmcrh_EMA_10_ti_h20\tmcrh_KAMA_10_DEMA_20\t\nmcrh_KAMA_10_EMA_20\tmcrh_KAMA_10_KAMA_20\tmcrh_KAMA_10_SMA_20\tmcrh_KAMA_10_T3_20\tmcrh_KAMA_10_TEMA_20\t\nmcrh_KAMA_10_TRIMA_20\tmcrh_KAMA_10_WMA_20\tmcrh_KAMA_10_DEMA_50\tmcrh_KAMA_10_EMA_50\tmcrh_KAMA_10_KAMA_50\t\nmcrh_KAMA_10_SMA_50\tmcrh_KAMA_10_T3_50\tmcrh_KAMA_10_TEMA_50\tmcrh_KAMA_10_TRIMA_50\tmcrh_KAMA_10_WMA_50\t\nmcrh_KAMA_10_DEMA_100\tmcrh_KAMA_10_EMA_100\tmcrh_KAMA_10_KAMA_100\tmcrh_KAMA_10_SMA_100\tmcrh_KAMA_10_T3_100\t\nmcrh_KAMA_10_TEMA_100\tmcrh_KAMA_10_TRIMA_100\tmcrh_KAMA_10_WMA_100\tmcrh_KAMA_10_ti_h20\tmcrh_SMA_10_DEMA_20\t\nmcrh_SMA_10_EMA_20\tmcrh_SMA_10_KAMA_20\tmcrh_SMA_10_SMA_20\tmcrh_SMA_10_T3_20\tmcrh_SMA_10_TEMA_20\tmcrh_SMA_10_TRIMA_20\t\nmcrh_SMA_10_WMA_20\tmcrh_SMA_10_DEMA_50\tmcrh_SMA_10_EMA_50\tmcrh_SMA_10_KAMA_50\tmcrh_SMA_10_SMA_50\tmcrh_SMA_10_T3_50\t\nmcrh_SMA_10_TEMA_50\tmcrh_SMA_10_TRIMA_50\tmcrh_SMA_10_WMA_50\tmcrh_SMA_10_DEMA_100\tmcrh_SMA_10_EMA_100\t\nmcrh_SMA_10_KAMA_100\tmcrh_SMA_10_SMA_100\tmcrh_SMA_10_T3_100\tmcrh_SMA_10_TEMA_100\tmcrh_SMA_10_TRIMA_100\t\nmcrh_SMA_10_WMA_100\tmcrh_SMA_10_ti_h20\tmcrh_T3_10_DEMA_20\tmcrh_T3_10_EMA_20\tmcrh_T3_10_KAMA_20\tmcrh_T3_10_SMA_20\t\nmcrh_T3_10_T3_20\tmcrh_T3_10_TEMA_20\tmcrh_T3_10_TRIMA_20\tmcrh_T3_10_WMA_20\tmcrh_T3_10_DEMA_50\tmcrh_T3_10_EMA_50\t\nmcrh_T3_10_KAMA_50\tmcrh_T3_10_SMA_50\tmcrh_T3_10_T3_50\tmcrh_T3_10_TEMA_50\tmcrh_T3_10_TRIMA_50\tmcrh_T3_10_WMA_50\t\nmcrh_T3_10_DEMA_100\tmcrh_T3_10_EMA_100\tmcrh_T3_10_KAMA_100\tmcrh_T3_10_SMA_100\tmcrh_T3_10_T3_100\tmcrh_T3_10_TEMA_100\t\nmcrh_T3_10_TRIMA_100\tmcrh_T3_10_WMA_100\tmcrh_T3_10_ti_h20\tmcrh_TEMA_10_DEMA_20\tmcrh_TEMA_10_EMA_20\t\nmcrh_TEMA_10_KAMA_20\tmcrh_TEMA_10_SMA_20\tmcrh_TEMA_10_T3_20\tmcrh_TEMA_10_TEMA_20\tmcrh_TEMA_10_TRIMA_20\t\nmcrh_TEMA_10_WMA_20\tmcrh_TEMA_10_DEMA_50\tmcrh_TEMA_10_EMA_50\tmcrh_TEMA_10_KAMA_50\tmcrh_TEMA_10_SMA_50\t\nmcrh_TEMA_10_T3_50\tmcrh_TEMA_10_TEMA_50\tmcrh_TEMA_10_TRIMA_50\tmcrh_TEMA_10_WMA_50\tmcrh_TEMA_10_DEMA_100\t\nmcrh_TEMA_10_EMA_100\tmcrh_TEMA_10_KAMA_100\tmcrh_TEMA_10_SMA_100\tmcrh_TEMA_10_T3_100\tmcrh_TEMA_10_TEMA_100\t\nmcrh_TEMA_10_TRIMA_100\tmcrh_TEMA_10_WMA_100\tmcrh_TEMA_10_ti_h20\tmcrh_TRIMA_10_DEMA_20\tmcrh_TRIMA_10_EMA_20\t\nmcrh_TRIMA_10_KAMA_20\tmcrh_TRIMA_10_SMA_20\tmcrh_TRIMA_10_T3_20\tmcrh_TRIMA_10_TEMA_20\tmcrh_TRIMA_10_TRIMA_20\t\nmcrh_TRIMA_10_WMA_20\tmcrh_TRIMA_10_DEMA_50\tmcrh_TRIMA_10_EMA_50\tmcrh_TRIMA_10_KAMA_50\tmcrh_TRIMA_10_SMA_50\t\nmcrh_TRIMA_10_T3_50\tmcrh_TRIMA_10_TEMA_50\tmcrh_TRIMA_10_TRIMA_50\tmcrh_TRIMA_10_WMA_50\tmcrh_TRIMA_10_DEMA_100\t\nmcrh_TRIMA_10_EMA_100\tmcrh_TRIMA_10_KAMA_100\tmcrh_TRIMA_10_SMA_100\tmcrh_TRIMA_10_T3_100\tmcrh_TRIMA_10_TEMA_100\t\nmcrh_TRIMA_10_TRIMA_100\tmcrh_TRIMA_10_WMA_100\tmcrh_TRIMA_10_ti_h20\tmcrh_WMA_10_DEMA_20\tmcrh_WMA_10_EMA_20\t\nmcrh_WMA_10_KAMA_20\tmcrh_WMA_10_SMA_20\tmcrh_WMA_10_T3_20\tmcrh_WMA_10_TEMA_20\tmcrh_WMA_10_TRIMA_20\tmcrh_WMA_10_WMA_20\t\nmcrh_WMA_10_DEMA_50\tmcrh_WMA_10_EMA_50\tmcrh_WMA_10_KAMA_50\tmcrh_WMA_10_SMA_50\tmcrh_WMA_10_T3_50\tmcrh_WMA_10_TEMA_50\t\nmcrh_WMA_10_TRIMA_50\tmcrh_WMA_10_WMA_50\tmcrh_WMA_10_DEMA_100\tmcrh_WMA_10_EMA_100\tmcrh_WMA_10_KAMA_100\t\nmcrh_WMA_10_SMA_100\tmcrh_WMA_10_T3_100\tmcrh_WMA_10_TEMA_100\tmcrh_WMA_10_TRIMA_100\tmcrh_WMA_10_WMA_100\t\nmcrh_WMA_10_ti_h20\tmcrh_DEMA_20_DEMA_50\tmcrh_DEMA_20_EMA_50\tmcrh_DEMA_20_KAMA_50\tmcrh_DEMA_20_SMA_50\t\nmcrh_DEMA_20_T3_50\tmcrh_DEMA_20_TEMA_50\tmcrh_DEMA_20_TRIMA_50\tmcrh_DEMA_20_WMA_50\tmcrh_DEMA_20_DEMA_100\t\nmcrh_DEMA_20_EMA_100\tmcrh_DEMA_20_KAMA_100\tmcrh_DEMA_20_SMA_100\tmcrh_DEMA_20_T3_100\tmcrh_DEMA_20_TEMA_100\t\nmcrh_DEMA_20_TRIMA_100\tmcrh_DEMA_20_WMA_100\tmcrh_EMA_20_DEMA_50\tmcrh_EMA_20_EMA_50\tmcrh_EMA_20_KAMA_50\t\nmcrh_EMA_20_SMA_50\tmcrh_EMA_20_T3_50\tmcrh_EMA_20_TEMA_50\tmcrh_EMA_20_TRIMA_50\tmcrh_EMA_20_WMA_50\t\nmcrh_EMA_20_DEMA_100\tmcrh_EMA_20_EMA_100\tmcrh_EMA_20_KAMA_100\tmcrh_EMA_20_SMA_100\tmcrh_EMA_20_T3_100\t\nmcrh_EMA_20_TEMA_100\tmcrh_EMA_20_TRIMA_100\tmcrh_EMA_20_WMA_100\tmcrh_KAMA_20_DEMA_50\tmcrh_KAMA_20_EMA_50\t\nmcrh_KAMA_20_KAMA_50\tmcrh_KAMA_20_SMA_50\tmcrh_KAMA_20_T3_50\tmcrh_KAMA_20_TEMA_50\tmcrh_KAMA_20_TRIMA_50\t\nmcrh_KAMA_20_WMA_50\tmcrh_KAMA_20_DEMA_100\tmcrh_KAMA_20_EMA_100\tmcrh_KAMA_20_KAMA_100\tmcrh_KAMA_20_SMA_100\t\nmcrh_KAMA_20_T3_100\tmcrh_KAMA_20_TEMA_100\tmcrh_KAMA_20_TRIMA_100\tmcrh_KAMA_20_WMA_100\tmcrh_SMA_20_DEMA_50\t\nmcrh_SMA_20_EMA_50\tmcrh_SMA_20_KAMA_50\tmcrh_SMA_20_SMA_50\tmcrh_SMA_20_T3_50\tmcrh_SMA_20_TEMA_50\tmcrh_SMA_20_TRIMA_50\t\nmcrh_SMA_20_WMA_50\tmcrh_SMA_20_DEMA_100\tmcrh_SMA_20_EMA_100\tmcrh_SMA_20_KAMA_100\tmcrh_SMA_20_SMA_100\t\nmcrh_SMA_20_T3_100\tmcrh_SMA_20_TEMA_100\tmcrh_SMA_20_TRIMA_100\tmcrh_SMA_20_WMA_100\tmcrh_T3_20_DEMA_50\t\nmcrh_T3_20_EMA_50\tmcrh_T3_20_KAMA_50\tmcrh_T3_20_SMA_50\tmcrh_T3_20_T3_50\tmcrh_T3_20_TEMA_50\tmcrh_T3_20_TRIMA_50\t\nmcrh_T3_20_WMA_50\tmcrh_T3_20_DEMA_100\tmcrh_T3_20_EMA_100\tmcrh_T3_20_KAMA_100\tmcrh_T3_20_SMA_100\tmcrh_T3_20_T3_100\t\nmcrh_T3_20_TEMA_100\tmcrh_T3_20_TRIMA_100\tmcrh_T3_20_WMA_100\tmcrh_TEMA_20_DEMA_50\tmcrh_TEMA_20_EMA_50\t\nmcrh_TEMA_20_KAMA_50\tmcrh_TEMA_20_SMA_50\tmcrh_TEMA_20_T3_50\tmcrh_TEMA_20_TEMA_50\tmcrh_TEMA_20_TRIMA_50\t\nmcrh_TEMA_20_WMA_50\tmcrh_TEMA_20_DEMA_100\tmcrh_TEMA_20_EMA_100\tmcrh_TEMA_20_KAMA_100\tmcrh_TEMA_20_SMA_100\t\nmcrh_TEMA_20_T3_100\tmcrh_TEMA_20_TEMA_100\tmcrh_TEMA_20_TRIMA_100\tmcrh_TEMA_20_WMA_100\tmcrh_TRIMA_20_DEMA_50\t\nmcrh_TRIMA_20_EMA_50\tmcrh_TRIMA_20_KAMA_50\tmcrh_TRIMA_20_SMA_50\tmcrh_TRIMA_20_T3_50\tmcrh_TRIMA_20_TEMA_50\t\nmcrh_TRIMA_20_TRIMA_50\tmcrh_TRIMA_20_WMA_50\tmcrh_TRIMA_20_DEMA_100\tmcrh_TRIMA_20_EMA_100\tmcrh_TRIMA_20_KAMA_100\t\nmcrh_TRIMA_20_SMA_100\tmcrh_TRIMA_20_T3_100\tmcrh_TRIMA_20_TEMA_100\tmcrh_TRIMA_20_TRIMA_100\tmcrh_TRIMA_20_WMA_100\t\nmcrh_WMA_20_DEMA_50\tmcrh_WMA_20_EMA_50\tmcrh_WMA_20_KAMA_50\tmcrh_WMA_20_SMA_50\tmcrh_WMA_20_T3_50\tmcrh_WMA_20_TEMA_50\t\nmcrh_WMA_20_TRIMA_50\tmcrh_WMA_20_WMA_50\tmcrh_WMA_20_DEMA_100\tmcrh_WMA_20_EMA_100\tmcrh_WMA_20_KAMA_100\t\nmcrh_WMA_20_SMA_100\tmcrh_WMA_20_T3_100\tmcrh_WMA_20_TEMA_100\tmcrh_WMA_20_TRIMA_100\tmcrh_WMA_20_WMA_100\t\nmcrh_DEMA_50_DEMA_100\tmcrh_DEMA_50_EMA_100\tmcrh_DEMA_50_KAMA_100\tmcrh_DEMA_50_SMA_100\tmcrh_DEMA_50_T3_100\t\nmcrh_DEMA_50_TEMA_100\tmcrh_DEMA_50_TRIMA_100\tmcrh_DEMA_50_WMA_100\tmcrh_DEMA_50_ti_h20\tmcrh_EMA_50_DEMA_100\t\nmcrh_EMA_50_EMA_100\tmcrh_EMA_50_KAMA_100\tmcrh_EMA_50_SMA_100\tmcrh_EMA_50_T3_100\tmcrh_EMA_50_TEMA_100\t\nmcrh_EMA_50_TRIMA_100\tmcrh_EMA_50_WMA_100\tmcrh_EMA_50_ti_h20\tmcrh_KAMA_50_DEMA_100\tmcrh_KAMA_50_EMA_100\t\nmcrh_KAMA_50_KAMA_100\tmcrh_KAMA_50_SMA_100\tmcrh_KAMA_50_T3_100\tmcrh_KAMA_50_TEMA_100\tmcrh_KAMA_50_TRIMA_100\t\nmcrh_KAMA_50_WMA_100\tmcrh_KAMA_50_ti_h20\tmcrh_SMA_50_DEMA_100\tmcrh_SMA_50_EMA_100\tmcrh_SMA_50_KAMA_100\t\nmcrh_SMA_50_SMA_100\tmcrh_SMA_50_T3_100\tmcrh_SMA_50_TEMA_100\tmcrh_SMA_50_TRIMA_100\tmcrh_SMA_50_WMA_100\t\nmcrh_SMA_50_ti_h20\tmcrh_T3_50_DEMA_100\tmcrh_T3_50_EMA_100\tmcrh_T3_50_KAMA_100\tmcrh_T3_50_SMA_100\tmcrh_T3_50_T3_100\t\nmcrh_T3_50_TEMA_100\tmcrh_T3_50_TRIMA_100\tmcrh_T3_50_WMA_100\tmcrh_T3_50_ti_h20\tmcrh_TEMA_50_DEMA_100\tmcrh_TEMA_50_EMA_100\nmcrh_TEMA_50_KAMA_100\tmcrh_TEMA_50_SMA_100\tmcrh_TEMA_50_T3_100\tmcrh_TEMA_50_TEMA_100\tmcrh_TEMA_50_TRIMA_100\t\nmcrh_TEMA_50_WMA_100\tmcrh_TEMA_50_ti_h20\tmcrh_TRIMA_50_DEMA_100\tmcrh_TRIMA_50_EMA_100\tmcrh_TRIMA_50_KAMA_100\t\nmcrh_TRIMA_50_SMA_100\tmcrh_TRIMA_50_T3_100\tmcrh_TRIMA_50_TEMA_100\tmcrh_TRIMA_50_TRIMA_100\tmcrh_TRIMA_50_WMA_100\t\nmcrh_TRIMA_50_ti_h20\tmcrh_WMA_50_DEMA_100\tmcrh_WMA_50_EMA_100\tmcrh_WMA_50_KAMA_100\tmcrh_WMA_50_SMA_100\t\nmcrh_WMA_50_T3_100\tmcrh_WMA_50_TEMA_100\tmcrh_WMA_50_TRIMA_100\tmcrh_WMA_50_WMA_100\tmcrh_WMA_50_ti_h20\t\nmcrh_DEMA_100_ti_h20\tmcrh_EMA_100_ti_h20\tmcrh_KAMA_100_ti_h20\tmcrh_SMA_100_ti_h20\tmcrh_T3_100_ti_h20\t\nmcrh_TEMA_100_ti_h20\tmcrh_TRIMA_100_ti_h20\tmcrh_WMA_100_ti_h20\tNQ_Close\tNQ_Volume\tNQ_per_Close\t\nNQ_per_Volume\tNQ_SMA_20\tNQ_SMA_100```\n\n\n**https://github.com/Leci37/LecTrade LecTrade is a tool created by github user @Leci37. instagram @luis__leci Shared on 2022/11/12 .   . No warranty, rights reserved**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLeci37%2FTensorFlow-stocks-prediction-Machine-learning-RealTime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLeci37%2FTensorFlow-stocks-prediction-Machine-learning-RealTime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLeci37%2FTensorFlow-stocks-prediction-Machine-learning-RealTime/lists"}