投资组合优化 期货量化计谋规划公式 文采财经规划公式源码 量化波段王规划
图片
VAR0:=REFX1(BARSLAST(HIGH=(HHV(HIGH,10 * N))),10000)+1;
VAR1 := REFX1(BARSLAST(LOW = (LLV(LOW,10 * N))),10000)+1;
VAR2 := REFX1(IF(VAR0 = 1,HIGH,REF(HIGH,VAR0 - 1)),10000);
VAR3 := REFX1(IF(VAR1 = 1,LOW,REF(LOW,VAR1 - 1)),10000);
VAR4 := MIN(VAR1,VAR0);
VAR5 := MAX(VAR0,VAR1);
VAR6 := VAR5 - VAR4;
VAR7 := REFX1((VAR2 - VAR3) / VAR6,10000);
CURRBARSCOUNT:=BARPOS-DATACOUNT+1;
VAR8 := IF(VAR4 = VAR1,VAR5 - CURRBARSCOUNT,CURRBARSCOUNT - VAR4);
VAR9 := IF(CURRBARSCOUNT <= VAR5,VAR2 - (VAR7 * VAR8),NULL);
VAR10 := IF(VAR5 = VAR1,((VAR9 - VAR3) / 2) + VAR3,VAR2 - ((VAR2 - VAR9) / 2));
VAR11 := IF(VAR5 = VAR1,((VAR9 - VAR3) / 3) + VAR3,VAR2 - ((VAR2 - VAR9) / 3));
VAR12 := IF(VAR5 = VAR1,((VAR9 - VAR3) / 4) + VAR3,VAR2 - ((VAR2 - VAR9) / 4));
本站仅提供存储管事,通盘本体均由用户发布,如发现存害或侵权本体,请点击举报。