AFL CODING NEED UR HELP

hi

i want to know
how to

get buy signal using spertrend
when the value of supertrend is above the close of first candle

please help me in coding this one

thanks in advance.