代码教程 pine语言动量2.0策略转文华my语言

N := 6;
momentum:CLOSE-REF(CLOSE,N);
mom:(momentum)/std(momentum,100);
momentumsmoothed:forcast(mom,30);
momentumbase:ema(mom,100);
cross(momentumsmoothed,momentumbase),BPK;
cross(momentumbase,momentumsmoothed),SPK;
N := 6;
momentum:CLOSE-REF(CLOSE,N);
mom:(momentum)/std(momentum,100);
momentumsmoothed:forcast(mom,30);
momentumbase:ema(mom,100);
cross(momentumsmoothed,momentumbase),BPK;
cross(momentumbase,momentumsmoothed),SPK;