м╗╢Опеж╦╠Йё╨р╩оъ╢╘3оъжВм╪
LC:=REF(C,1);
M5:MA(C,5);
M10:MA(C,10);
M20:MA(C,20);
M30:MA(C,30),COLORFFCC00;
VAR1:=EMA(EMA(C,9),9);
©ьел:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
EEM8:=EMA(EMA(C,8),8);
вй╫П:=(EEM8-REF(EEM8,1))/REF(EEM8,1)*1000;
спв╞:=вй╫П
нчв╞:=вй╫П
бРоъ:=EMA(C,3);
бТоъ:=EMA(SLOPE(C,22)*20+C,54);
BU1:=CROSS(бРоъ,бТоъ);
SEL1:=CROSS(бТоъ,бРоъ);
BU2:=IFF(BU1 AND спв╞,1,IFF(COUNT(BU1 AND нчв╞,BARSLAST(SEL1)+1)=1 AND CROSS(вй╫П,0),1,0));
BU:=BU2 AND COUNT(BU2,BARSLAST(SEL1)+1)=1;
SEL:=SEL1 AND COUNT(SEL1,BARSLAST(BU)+1)=1;
ж╧кПA:=C/REF(O,BARSLAST(BU)) 0.93 AND COUNT(BU,BARSLAST(BU)+1)=1 AND COUNT(SEL,BARSLAST(BU)+1)=0;
SELNEW:=IFF(ж╧кПA AND COUNT(ж╧кПA,BARSLAST(BU)+1)=1,1,IFF(SEL AND COUNT(ж╧кПA,BARSLAST(BU)+1)=0,1,0));
жьбР:=COUNT(ж╧кПA,BARSLAST(BU)+1) =1 AND CROSS(C,0.965*REF(O,BARSLAST(BU)));
╡╩р╩лЛ:=(жьбР AND SELNEW)=0;
BUNEW2:=(BU OR жьбР) AND ╡╩р╩лЛ;
ж╧кПB:=(C/REF(O,BARSLAST(жьбР)) -0.06 AND COUNT(жьбР,BARSLAST(жьбР)+1)=1 AND COUNT(SEL,BARSLAST(жьбР)+1)=0);
жьбТ:=(SEL AND COUNT(жьбР,BARSLAST(BUNEW2)+1)=1) OR (ж╧кПB AND SUM(ж╧кПB,0)=1);
╡╩р╩лЛ2:=((жьбТ AND BUNEW2)=0);
SELNEW2:=((SELNEW AND COUNT(SELNEW,BARSLAST(BUNEW2)+1)=1) OR жьбТ) AND ╡╩р╩лЛ2;
BUNEW3:=BUNEW2 AND COUNT(BUNEW2,BARSLAST(SELNEW2)+1)=1;
SELNEW3:=SELNEW2 AND COUNT(SELNEW2,BARSLAST(BUNEW3)+1)=1;
D:=BARSLAST(BUNEW3)+1 =1 AND COUNT(SELNEW3,BARSLAST(BUNEW3)+1)=0;
K:=BARSLAST(SELNEW3)+1 =1 AND COUNT(BUNEW3,BARSLAST(SELNEW3)+1)=0;
пчуЩ╤╗н╩:=IFF(COUNT(SELNEW3,BARSCOUNT(C))=0 AND COUNT(BUNEW3,BARSCOUNT(C))=0,1,0);
пчуЩюш╪ф:=SUM(пчуЩ╤╗н╩,1000)+1;
╬╚в╪пчуЩюш╪ф:=IFF(пчуЩюш╪ф=REF(пчуЩюш╪ф,1) AND REF(пчуЩюш╪ф,2) пчуЩюш╪ф,пчуЩюш╪ф,0);
иойппчуЩB:=пчуЩ╤╗н╩ AND CROSS(©ьел,0);
иойппчуЩS:=пчуЩ╤╗н╩ AND CROSS(0,©ьел) AND COUNT(иойппчуЩB,BARSLAST(C 0))
иойпD:=COUNT(иойппчуЩB,BARSLAST(иойппчуЩB)+1)=1 AND COUNT(иойппчуЩS,BARSLAST(иойппчуЩB)+1)=0 AND COUNT (SELNEW3,BARSCOUNT(C))=0;
иойпK:=COUNT(иойппчуЩS,BARSLAST(иойппчуЩS)+1)=1 AND COUNT(иойппчуЩB,BARSLAST(иойппчуЩS)+1)=0 AND COUNT
(BUNEW3,BARSCOUNT(C))=0;
SSXZBZS:=COUNT(иойппчуЩB,BARSCOUNT(C));
SSXZSZS:=COUNT(иойппчуЩS,BARSCOUNT(C));
QB:=IFF(пчуЩ╤╗н╩,иойппчуЩB,BUNEW3);
QS:=IFF(пчуЩ╤╗н╩,иойппчуЩS AND (SSXZBZS==SSXZSZS AND SSXZBZS =0 AND COUNT(SELNEW3,BARSCOUNT(C))=1 AND COUNT
(BUNEW3,BARSCOUNT(C))=0)=0, SELNEW3 AND (SSXZBZS=SSXZSZS AND SSXZBZS =0 AND COUNT(SELNEW3,BARSCOUNT(C))=1 AND COUNT
(BUNEW3,BARSCOUNT(C))=0)=0);
K╡╧:=(COUNT(иойппчуЩB,BARSLAST(C 0))=0 AND COUNT(QB,BARSLAST(C 0))==0)==0;
STICKLINE(D OR иойпD,H,L,0,0),COLOR0000EE;
STICKLINE(D OR иойпD,C,O,2,0),COLOR0000EE;
STICKLINE((K AND K╡╧) OR иойпK,H,L,0,0),COLORFFBB00;
STICKLINE((K AND K╡╧) OR иойпK,C,O,2,0),COLORFFBB00;
DRAWICON(QB,L*0.975,23);
DRAWICON(QS,H*1.02,27);
р╩оъ╢╘3оъ:IF(C MAX(M5,MAX(M10,MIN(M20,M30))) AND LC =(MIN(REF(M5,1),MIN(REF(M10,1),
MAX(REF(M20,1),REF(M30,1))))),L*0.985,DRAWNULL),COLOR00FFFF,LINETHICK6,CROSSDOT;
р╩оъфф3оъ:IF(C MIN(M5,MIN(M10,MAX(M20,M30))) AND LC =(MAX(REF(M5,1),MAX(REF(M10,1),
MIN(REF(M20,1),REF(M30,1))))),H*1.01,DRAWNULL),COLOR00FF00,LINETHICK6,CROSSDOT;
STICKLINE(р╩оъ╢╘3оъ=L*0.985,C,O,2,0),COLORFF00FF;
STICKLINE(р╩оъфф3оъ=H*1.01,C,O,2,0),COLOR00FF00;