Square of nine gann

Hi, I am trying to write a code which triggers, when open price equals the square of nine.
I usually do it manually every day.

This is what I have written. suggest corrections.
X=1++
X<10000
LOOP(X,2,1,0,MULTIPLY)
OPEN=X

#as OPEN is the current candles open by default, how to set it to Day’s candle.

Kindly share more details so i can help.i do devlop such code for you. Provide example to explain your point.