Maybe something like this?
P = ParamField( "Price field" );
periodsA = Param("1st Deriv Period", 200, 100, 250, 10 );
periodsB = Param("2nd Deriv Period", 50, 10, 50, 1 );
PROCA = P - ref( P, -periodsA );
PROCB = PROCA - Ref( PROCA, -periodsB );
Plot( PROCB / p, _DEFAULT_NAME(), colorRed, styleLine );
r1 = ROC(P, periodsA);
r2 = Remap(r1, Lowest(r1), Highest(r1), 0, Highest(r1) - Lowest(r1));
r3 = r2 - Ref( r2, -periodsB );
Plot( r3, _DEFAULT_NAME(), colorBlue, styleLine | styleOwnScale);