趋势线主图(自动画出来的,带压力支撑的不错)
P:=10;豆:=REF(HIGH,P)=HHV(HIGH,2*P+1);豆豆:=FILTER(豆,P);豆豆1981:=BacKSET(豆豆,P+1);豆1981:=FILTER(豆豆1981,P);{高点}压力:REF(HIGH,BArslAST(豆1981)),COLORFF00FF,POINTDOT;R11:=BACKSET(ISLASTBAR,BARSLAST(豆1981)+1); S11:=R11>REF(R11,1);压力轨:DRAWLINE(豆1981,HIGH,S11,HIGH,1),COLORYELLOW;AA2:=REF(LOW,P)=LLV(LOW,2*P+1);BB2:=FILTER(AA2,P);CC2:=BACKSET(BB2,P+1);DD2:=FILTER(CC2,P);{低点}支撑:REF(LOW,BARSLAST(DD2)),COLOR00FF00,POINTDOT;T11:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);U11:=T11>REF(T11,1);支撑轨:DRAWLINE(DD2,LOW,U11,LOW,1),COLORBLUE;中轨:(压力轨+支撑轨)/2,COLORWHITE;