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

Mã được bảo vệ
Tập lệnh này được xuất bản mã nguồn đóng và bạn có thể sử dụng một cách tự do. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ. Bạn không thể xem hoặc sửa đổi mã nguồn.
Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?