foolsbookie

Quantitative mean reversion v4

The code uses the concept of mean reversion. Mean reversion suggests that price over a period of time reverts back to its statistical mean. In simple terms, it means if a price has drifted apart from the statistical mean, after a certain amount of time, it will revert back to its statistical mean. This drift is measured via z-score. When the z-score value is high, the price is expected to revert. Besides, the higher the time frame you use, the lesser the drift is, so reduce the z-score in the tabs if you use higher time frames, else, vice-versa.

Based on the parameters, the code will provide a trade signal - both long and short, and entry and exit. You can use notifications for alerts. Please use the parameters in the options to find the best combinations for your stocks.

In the properties, you can use your own brokers commission, capital, to see if the strategy is profitable for your ticker in the long run or not. This code has been tested for profits for various assets in both crypto - Bitcoin futures , Ethereum futures -, and stocks - AMD , Apple , MSFT , etc.

This is not get rich quick scheme, and you have to be patient with it for the long run.

If you have any query, please feel free to ask in the comments sections.

If you want some new changes, please feel free to suggest

Currently, I am optimising the maximum time for holding a trade. Till that's completed, use this and please feel free to leave a feedback to make it better

Skyddat skript
Detta skript publiceras med stängd källkod och du kan använda det fritt. Du kan ange den som favorit för att använda den i ett diagram. Du kan inte visa eller ändra dess källkod.
Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?