I design an exploartion for the closing price of the 5th bars and 10 bars prior to the bar with the lowest price within the current 52 weeks. If the today(close) price is higher than those (5th and 10 th) closing price, it is a signal to long and vice versa.
@roychan you have been a member of this forum for more than 2 years and yet in many of your posts you refuse to properly use code tags when posting a code sample. Why do you refuse to use this forum properly?
Try this for finding the Close 10 bars before the Lowest Low of the previous 252 bars (one year of daily bars).
Unfortunately the code line of previous post is not correct in a way to get actual bar of lowest low of previous n-period.
Instead code for getting bars having passed since LLV is achieved by using LLVBars() function and then using Ref() for getting five and ten bars back from there to get price before LLV bar.