Exploration for using 52 weeks low as reference bar

Hello,

I am trying to set up a explorationl to use 52 weeks low (bar) as reference bar to scan for stocks which the recent bar is greater than that of close of 20 bars ago. Can anyone help me??

Let me clarify for the design.
I want to design an exploartion for the closing price of the 20th bar prior to the bar with the lowest price within the current 52 weeks. If the current price is higher than that closing price, it is a signal to long and vice versa.

@roychan, what have you coded so far and where are you uncertain?

You will likely need a couple of lines of code that use some of these functions,

https://www.amibroker.com/guide/afl/llv.html

https://www.amibroker.com/guide/afl/barssince.html

Or

https://www.amibroker.com/guide/afl/llvbars.html

And of course

https://www.amibroker.com/guide/afl/ref.html

Put some effort into it and if you can not get it completely solved show the forum where you are stuck.

1 Like