I've noticed yelp is co-integrated with BNS . So, this chart represents bns /yelps pair price .
I am initiating a position in YELP based on this .
There are things I don't like about yelp like its p/e but all in all its a good entry based on statistic arbitrage of the pair price .
PS: I put together this pair price but it will not update due to the way I did this the ratio would quickly become inaccurate and would need to be recalculated manually if your looking for an updated pair price later on.
I am initiating a position in YELP based on this .
There are things I don't like about yelp like its p/e but all in all its a good entry based on statistic arbitrage of the pair price .
PS: I put together this pair price but it will not update due to the way I did this the ratio would quickly become inaccurate and would need to be recalculated manually if your looking for an updated pair price later on.
艾力克~
I couldn't figure out what was wrong with my formula becuase every time I ran the code I would get a chart that did not represent the pair price. Then I realized there was nothing wrong with it and the problem was it always = 0
Stock 1 - Stock 2 * (stock1/stock2 aka ratio) = 0 and I had my formula updating every candle so essentially I was resetting my code to 0 every candle interval , giving me a very weird looking chart >.<
Took me way to long to realize that my pinescript code was working just fine and the problem was my logic ( and I did not even need a custom code ! its fine the way it is here)
So, this pair price DOES automatically update and you are free to use this chart for an updated BNS/YELP pair price .
***Right now I am long yelp and once this pair price hits the middle bollinger band that will be an exit indicator .
Have a great day !