编写要求:
公式在线网解答:
网友求助:
源码如下,请老师帮助改写成选股公式,能选出当天或是N天内出现红色抄底信号的个股,谢谢!
VAR01:=EMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5);
VAR02:=(HHV(HIGH,25)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),7)+5;
VAR03:=(HHV(HIGH,25)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),18)+5;
CROSS(VAR03,VAR02)=1 AND CROSS(VAR01,VAR02)=1 AND HHV(VAR02,12)<26,COLORMAGENTA;
解答如下:
VAR01:=EMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5);
VAR02:=(HHV(HIGH,25)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),7)+5;
VAR03:=(HHV(HIGH,25)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),18)+5;
CROSS(VAR03,VAR02)=1 AND CROSS(VAR01,VAR02)=1 AND HHV(VAR02,12)<26 OR COUNT(CROSS(VAR03,VAR02)=1 AND CROSS(VAR01,VAR02)=1 AND HHV(VAR02,12)<26,10)>=1;;