如何寫出近一個月波動小於15%,股本小於50億的股票
//近一個月波動小於15%,且股本小於50億
input:m(4,"最近x個禮拜");//一個月大約等於四個禮拜
input:MaxCapital(50,"股本(億)");
value1=highest(getfield("High","w"),m); //近一個月高點
value2=lowest(getfield("low","w"),m); //近一個月低點
value3=value1-value2;
value4=(value3/c[20])*100;
value5 = GetField("最新股本");
if value3 < c[20]*0.15 and value5 <= MaxCapital then ret=1;
outputfield1(value1,"近一月高點");
outputfield2(value2,"近一月低點");
outputfield3(value4,"波動幅度(%)");
outputfield4(value5,"股本(億)");