can anybody convert following amibroker code to metastock code ?
_SECTION_BEGIN("Stochastic %K %D");
periods = Param( "Periods", 8, 1, 2000, 1 );//156
Ksmooth = Param( "%K avg", 3, 1, 2000, 1 );//72
Dsmooth = Param( "%D avg", 4, 1, 2000, 1 );//12
tf = Param( "TF", 6, 1, 375, 1 );
TimeFrameSet(in1Minute*tf );
k0=StochK( periods , Ksmooth);
d0=StochD( periods , Ksmooth ,Dsmooth);
TimeFrameRestore();
k=TimeFrameExpand( k0, in1Minute*tf,expandFirst );//expandLast
d=TimeFrameExpand( d0, in1Minute*tf,expandFirst );//expandLast
Plot( k,"%K :", ParamColor( "%K Color", colorLime ), ParamStyle("Style") );
Plot( d,"%D :", ParamColor( "%D Color", colorRed), ParamStyle("Style") );
Plot( TF, "TF :", colorBlack);
diffstoch = k - d;
_SECTION_BEGIN("Ribbon");
barht = Param("Barht", 2, 1, 100, 1) ;
Clrup = ParamColor("Color +ve", colorLime) ;
Clrdn = ParamColor("Color -ve", colorRed) ;
rclr = diffstoch;
clr = IIf(rclr > 0, Clrup, Clrdn);
Plot(barht, "", clr, styleArea|styleNoLabel|styleOwnScale, 0, 100) ;
_SECTION_END();
_SECTION_BEGIN("Stochastic %K %D");
periods = Param( "Periods", 8, 1, 2000, 1 );//156
Ksmooth = Param( "%K avg", 3, 1, 2000, 1 );//72
Dsmooth = Param( "%D avg", 4, 1, 2000, 1 );//12
tf = Param( "TF", 6, 1, 375, 1 );
TimeFrameSet(in1Minute*tf );
k0=StochK( periods , Ksmooth);
d0=StochD( periods , Ksmooth ,Dsmooth);
TimeFrameRestore();
k=TimeFrameExpand( k0, in1Minute*tf,expandFirst );//expandLast
d=TimeFrameExpand( d0, in1Minute*tf,expandFirst );//expandLast
Plot( k,"%K :", ParamColor( "%K Color", colorLime ), ParamStyle("Style") );
Plot( d,"%D :", ParamColor( "%D Color", colorRed), ParamStyle("Style") );
Plot( TF, "TF :", colorBlack);
diffstoch = k - d;
_SECTION_BEGIN("Ribbon");
barht = Param("Barht", 2, 1, 100, 1) ;
Clrup = ParamColor("Color +ve", colorLime) ;
Clrdn = ParamColor("Color -ve", colorRed) ;
rclr = diffstoch;
clr = IIf(rclr > 0, Clrup, Clrdn);
Plot(barht, "", clr, styleArea|styleNoLabel|styleOwnScale, 0, 100) ;
_SECTION_END();