Zerodha PI Script : Buy Script

Was trying to convert my charting scanned to zerodha.
Can someone confirm if the code written is correct ??