I want to convert an AFL code into zerodha pi code for backtest and execution

_SECTION_BEGIN(“Price”);
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, V, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, “Close”, ParamColor(“Color”, colorBlack ), styleNoTitle | ParamStyle(“Style”) | GetPriceStyle() );
SetChartBkGradientFill( ParamColor(“Inner panel upper”,colorWhite),ParamColor(“Inner panel lower”,colorLightYellow));

_SECTION_END();

_SECTION_BEGIN(“fractals”);
acc = Param(“Acceleration”, 0.019, 0, 1, 0.001 );
accm = Param(“Max. acceleration”, 0.019, 0, 1, 0.001 );
Plot( SAR( acc, accm ), _DEFAULT_NAME(), ParamColor( “Color”, colorYellow ),
ParamStyle(“Style”, styleLine | styleLine, maskDefault | styleLine | styleLine )
);
Buy = Cross(Open, SAR(acc,accm));
Sell = Cross(SAR(acc,accm), Open );
Short=Sell;
Cover=Buy;
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone), colorBlack, 0, Low, Offset=-15);
PlotShapes(IIf(Sell, shapeDownArrow,shapeNone), colorBlue, 0, High,
Offset=-15);
dist = 2*ATR(2);
for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( “” + C[ i ], i, H[ i ]+dist[i], colorBlue );
if( Sell[i] ) PlotText( “” + C[ i ], i, L[ i ]-dist[i], colorBlack );
}
t1= Flip(Buy,Sell);
t2= Flip(Sell,Buy);
Filter = Buy OR Sell;
AddColumn( Buy, “Buy”, 1);
AddColumn( Sell, “Sell”, 1);
_SECTION_END();

Fractal SAR function is not available in tradescript as of now, so it is not possible to code SAR(acc,accm) in tradescript as of now