Amibroker please help

#1
Hello everyone,

I was hoping if someone with knowledge in Ami-broker can please help me.

I am simply trying to create a BUY signal when the current bar CLOSES 50% or below from the previous bar.


I thought maybe averaging out the previous bar might work but I'm so lost. hoping someone can help please.

Buy = Ref ((h - l)/ L ,-1)*100;