// @version=2 // 在这里创建您的自定义脚本 // RSV:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100; RSV = (close - lowest(low, 5)) / (highest(high, 5) - lowest(low, 5)) * 100; // K0:=SMA(RSV,3,1); K0 = smma(RSV, 3, 1); // K:=K0;D:=SMA(K0,2,1); K = K0; D = smma(K0, 2, 1); // J1:(3*K0-2*D),COLORYELLOW;J2:=MA(J1,2); J1 = (3 * K0 - 2 * D); plot(J1, title='J1', color='yellow'); J2 = ma(J1, 2); //MAV:=(2*C+H+L)/4; MAV = (2 * close + high + low) / 4; // VR1:=LLV(LOW,21); VR1 = lowest(low, 21); // VR2:=HHV(HIGH,21); VR2 = highest(high, 21); // SK: EMA((MAV-VR1)/(VR2-VR1)*100,8),COLORWHITE; SK = ema((MAV - VR1) / ( VR2 - VR1) * 100,8); plot(SK, title='SK', color='white'); // SD: EMA(0.667*REF(SK,1)+0.333*SK,1),COLORCYAN; SD = ema(0.667 * SK[1] + 0.333 * SK, 1); plot(SD, title='SD', color='cyan'); // SJ:=3*SK-2*SD; SJ = 3 * SK - 2 * SD; // A1:=REF(CLOSE,2); A1 = close[2]; // A2:=SMA(MAX(CLOSE-A1,0),7,1)/SMA(ABS(CLOSE-A1),7,1)*100; A2 = smma(max(close - A1, 0), 7, 1) / sma(abs(close - A1), 7, 1) * 100; // 波段介入点:IF(A2<19,19,0),COLORWHITE; 波段介入点 = A2 < 19 ? 19 : 0 plot(波段介入点, title='波段介入点', color='white'); // VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1); VAR1 = (low[1] + open[1] + close[1] + high[1]) / 4; // VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1); VAR2 = smma(abs(low - VAR1), 13, 1) / smma(max(low - VAR1, 0), 10, 1); // VAR3:=EMA(VAR2,10); VAR3 = ema(VAR2, 10); // plot(VAR3, title='VAR3', color='red'); // VAR4:=LLV(LOW,33); VAR4 = lowest(low, 33); // plot(VAR4, title='VAR4', color='red'); // VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3); VAR5 = ema(low <= VAR4 ? VAR3 : 0, 3); // plot(VAR5, title='VAR5', color='red'); // 主力进场:IF(VAR5>REF(VAR5,1),VAR5,0),LINETHICK0,COLORRED; 主力进场 = VAR5 > VAR5[1] ? VAR5 : 0; plot(主力进场, title='主力进场', color='red'); show_var5 = VAR5 > VAR5[1]; // STICKLINE(VAR5>REF(VAR5,1),0,VAR5,6,0),COLORRED; plotColumn(VAR5, title='VAR5', color='red', fill=true, display=show_var5); // STICKLINE(VAR5>REF(VAR5,1),0,VAR5,5,0 ),COLOR000055; plotColumn(VAR5, title='VAR5', color='000055', fill=true, display=show_var5); // STICKLINE(VAR5>REF(VAR5,1),0,VAR5,4,0 ),COLOR000077; plotColumn(VAR5, title='VAR5', color='000077', fill=true, display=show_var5); // STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3.1,0 ),COLOR000099; plotColumn(VAR5, title='VAR5', color='000099', fill=true, display=show_var5); // STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.5,0 ),COLOR0000BB; plotColumn(VAR5, title='VAR5', color='0000BB', fill=true, display=show_var5); // STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1.5,0 ),COLOR0000DD; plotColumn(VAR5, title='VAR5', color='0000DD', fill=true, display=show_var5); // STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1,0 ),COLOR0000FF; plotColumn(VAR5, title='VAR5', color='0000FF', fill=true, display=show_var5); // 洗盘:IF(VAR5=VAR14,VAR13,0),3); VAR15 = ema(high >= VAR14 ? VAR13 : 0, 3); // 冲顶:IF(VAR15>REF(VAR15,1),VAR15,0),LINETHICK0,COLORFF00FF; 冲顶 = VAR15 > VAR15[1] ? VAR15 : 0; plot(冲顶, title = '冲顶', color='FF00FF'); show_var15 = VAR15 > VAR15[1]; // STICKLINE(VAR15>REF(VAR15,1),0,VAR15,1,0 ),COLORFF00FF; plotColumn(VAR15, title='VAR15', color='red', fill=true, display=show_var15); // 主力出场:IF(VAR150,0,红柱,4,0),COLORRED; plotColumn(红柱, title='红柱', color='red', fill=true, display=(红柱 < 红柱[0.5] && 红柱 > 0)); // STICKLINE(红柱0,0,红柱,2,0),COLORGREEN; plotColumn(红柱, title='红柱', color='green', fill=true, display=(红柱 < 红柱[1] && 红柱 > 0)); // STICKLINE(红柱>REF(红柱,1) AND 红柱>0,0,红柱,3,0),COLORRED; plotColumn(红柱, title='红柱', color='red', fill=true, display=(红柱 > 红柱[1] && 红柱 > 0)); // STICKLINE(蓝柱0,0,蓝柱,2,0),COLOR00DDFF; plotColumn(蓝柱, title='蓝柱', color='00DDFF', fill=true, display=(蓝柱 < 蓝柱[1] && 蓝柱 > 0)); // STICKLINE(红柱>REF(红柱,1) AND 红柱<0,0,红柱,2,0),COLORFFDD00; plotColumn(红柱, title='红柱', color='FFDD00', fill=true, display=(红柱 > 红柱[1] && 红柱 < 0)); // STICKLINE(红柱REF(蓝柱,1) AND 蓝柱<0,0,蓝柱,2,0),COLORMAGENTA; plotColumn(蓝柱, title='蓝柱', color='magenta', fill=true, display=(蓝柱 > 蓝柱[1] && 蓝柱 < 0));