targetprice = Ref ( alt , -BarsSince ( Buy ) ) ;
alt is an array that constantly changes from bar to bar. I want targetprice to reference the specific value of the alt array at the bar when the buy signal occurred. The problem with the above solution, is that if another buy signal occurs before the price meets the original targetprice value, the value of targetprice changes.
So, how do I reference the value of from the specific bar the buy signal occurred?
Thanks.
alt is an array that constantly changes from bar to bar. I want targetprice to reference the specific value of the alt array at the bar when the buy signal occurred. The problem with the above solution, is that if another buy signal occurs before the price meets the original targetprice value, the value of targetprice changes.
So, how do I reference the value of from the specific bar the buy signal occurred?
Thanks.