Please convert below AFL code to tradescript for back testing in Pi

_SECTION_BEGIN(“StMom Chande Composite”);

Buy=Short=Sell=Cover=0;

LookBack = Param(“Lookback”, 13, 2, 100 );
Smooth1 = Param(“Smooth 1”, 25, 1, 100 );
Smooth2 = Param(“Smooth 2”, 2, 1, 100 );

HH = HHV( H, LookBack );
LL = LLV( L, LookBack );

StMom = 100 * EMA( EMA( C - 0.5 * ( HH + LL ), Smooth1 ), Smooth2 ) /
( 0.5 * EMA( EMA( HH - LL, Smooth1 ), Smooth2 ) );

Buy = stMom <= -40 AND Ref(StMom,-1) > 40;
Short = stMom > 40 AND Ref(StMom,-1) <= 40;

Buy = ExRem(Buy,Short);
Short = ExRem(Short,Buy);

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-20);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-30);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-25);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorRed, 0, H, Offset=20);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorOrange, 0,H, Offset=30);

PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-25);
_SECTION_END();

Can you please specify the condition/stratagy name or the formule..

as per the above code in tradescript 

Buy:

SET A = HHV(21)
SET B = LLV(21)
SET C = (CLOSE-0.5*(A+B))
SET D =  (CLOSE-0.5*(A-B))
SET E=((CROSSOVER(EMA(C, 20), EMA(C, 60))*100)/ (CROSSOVER(EMA(D, 20), EMA(D, 60))*100)
LAST= E<=-40 AND REF(E,-1)>40

Sell:

SET A = HHV(21)
SET B = LLV(21)
SET C = (CLOSE-0.5*(A+B))
SET D =  (CLOSE-0.5*(A-B))
SET E=(CROSSOVER(EMA(C, 20), EMA(C, 60))*100)/ ((CROSSOVER(EMA(D, 20), EMA(D, 60))*100)
LAST = E>40 AND REF(E,-1)<=40

If you can write your logic in simple english then it would be helpfull to convert in tradescript.