Fibonacci retracement at a 61,8% as explore function

Hello,

I'm looking for a AFL script, which can help me to find stocks with a fibonacci retracement at a 61,8% level. I would like to use function "Explore" from the Amibroker Analysis.

What interested me:

  1. The script looks at defined time period in the past (for example last 5, 6 or more months)
  2. Script defines max nad min price in order to create a fibonacci retracement.
  3. As a result it shoud give only one offer per stock
  4. As a result, the stock price should be on the 61,8% level. To be precise, one candlestick should reach the 61,8% level (look at an attached foto), then we have a signal.
  5. It should works for up and down trends. The example foto is for uptrend. It should be buy signal.

618

Can someone help to create this AFL code or give some ideas?

Best Regards