Modifying it to be able to use with price vectors
All changes are commented with blue /** commentary
Replace what they are nex to by them and it should work...
Plus found a mistake with indexies