I just had an idea & so put a simple indicator together for it. I'm not sure it's really of any use or how different it would actually work out being from using RVI to determine which way to open the baskets.
It calculates the linear regression of all pairs in each basket then gives each basket a score out of seven, which represents the number of pairs in the basket that are above their linear regression point. The expectation is that they will revert to the linear regression point over time.
Therefore, if you had a score of say 6 for the first basket & 2 for the second basket you would sell the first basket & buy the second. What do people think?
The defaults are 8 periods of 15min to calculate the numbers, but I don't know what would work best.
The code is not very pretty, feel free to use it, butcher it, or ignore it.
It calculates the linear regression of all pairs in each basket then gives each basket a score out of seven, which represents the number of pairs in the basket that are above their linear regression point. The expectation is that they will revert to the linear regression point over time.
Therefore, if you had a score of say 6 for the first basket & 2 for the second basket you would sell the first basket & buy the second. What do people think?
The defaults are 8 periods of 15min to calculate the numbers, but I don't know what would work best.
The code is not very pretty, feel free to use it, butcher it, or ignore it.
Attached File
Multipair Linear Regression.mq4
3 KB

204 downloads