以下是一些选股公式代码的例子,你可以根据自己的需要选择使用:
**股价跌幅达到一半的股票** :
```plaintext
xg:(hhv(c,30)-c)/hhv(c,30)>0.5
```
**今天的量是5天平均的2倍以上** :
```plaintext
xg:v>ma(v,5)*2
```
**缩量(即成交量是10天平均的0.3倍以下)** :
```plaintext
vol/ma(vol,10)<0.3
```
**股价是25天以来新低** :
```plaintext
xg:c```
**EXPMA 5日与10日金叉,并且第二天的收盘价在EXPMA的5日线以上** :
```plaintext
cross(ref(ema(c,5),1),ref(ema(c,10),1)) and c>ema(c,5)
```
**孤岛反转选股** :
```plaintext
T1:=ref(h,1)>ref(h,2) and l>ref(l,2)
T3:=c>ref(c,1) and c>o
选股:t1 and t2 and t3
```
**当日收盘价站上5日均线的个股** :
```plaintext
C>=ma(C,5)
```
**首板涨停的选股** (以创业板为例):
```plaintext
ZDF:=if(inblock('创业板'),0.2,if(inblock('科创板'),0.2,if(inblock('ST板块'),0.05,0.1)))
ZT:=ztprice(ref(c,1),zdf)
XG:zt=h and c=zt and ref(c,1)>=9.5 and h=c and (ref(c,1)-ref(c,2))/ref(c,2)*100=ztprice(ref(close,1),0.05) and c=h)
```
**黑马易找选股** :
```plaintext
VAR1:=ma(CLOSE,5)
VAR2:=ma(CLOSE,10)
VAR3:=ma(CLOSE,30)
VAR4:=ma(CLOSE,60)
VAR5:=ema(cost(85),7)
VAR6:=ema(cost(15),7)
```
**底部买多** (当RSI20低于11时,表示可能是一个买入信号):
```plaintext
CROSS(RSI20,11)*1,COLORRED
```
请注意,这些公式仅供参考,实际使用时需要根据市场情况和个人的投资策略进行调整。另外,请确保在使用这些公式时,你了解它们的工作原理和潜在的风险