TR:=Trough(2,C,10); {Target}
TR2:=Trough(3,C,10);
PK1:=Peak(1,C,10); {Target}
PK2:=Peak(2,C,10);
PKB1:=LastValue(PeakBars(1,C,10)); {Right Shoulder}
PKB2:=PeakBars(2,C,10);
TRB:=TroughBars(2,C,10); {Head}
TRB2:=TroughBars(3,C,10); {Left Shoulder}
TR1:=LLV(C,PKB1); {Right Shoulder}
TRB1:= LLVBars(C,PKB1);
CONDITION1:=TRB2<260 AND TRB2>TRB+15 AND TRB>TRB1+15 AND TRB2>PKB2+8 AND PKB2>TRB+8 AND PKB1>TRB1+8
AND TRB1>2 AND TRB1<43 AND TR1<PK1*(1-10/100);
CONDITION2:=TR<Min(TR2,TR1)-ATR(30) AND Max(TR2,TR1)-TR<9*ATR(30) AND Abs(TR1-TR2)<2*ATR(30)
AND Abs(PK1-PK2)<3*ATR(30);
TGT11:=PK1-TR;TGT:=PK1+1.2*TGT11;
CONDITION1 AND CONDITION2 AND C<tgt AND (Cross(C,PK1) OR Cross(C,TR1+3*ATR(30))) ;