I want trade script and afl coding

i want to write an algo where buy happens only when the complete candle above moving average.
kindly tell me how to write using trade script and afl

hello trader,

Tradescript example:

LOW > SMA(CLOSE,13)

Thank you so much