/*[[ Name := Disruption of Fraktal Author := Copyright © 2004, Phantom$ Link := http://forexsystems.ru Lots := 0.10 Stop Loss := 40 Take Profit := 0 Trailing Stop := 0 ]]*/ defines : porog(10),Tstop(50),fromYear(2004); vars : cnt(0); if yearHigh[3] and High[3]>High[4] and High[1]=Close[1] then { for cnt=1 to TotalTrades { If Ord(cnt,VAL_TYPE)=OP_BUY then exit; If Ord(cnt,VAL_TYPE)=OP_BUYSTOP then { if Ord(cnt,VAL_OPENPRICE)=High[2]+porog*Point then exit; ModifyOrder(Ord(cnt,VAL_TICKET),High[2]+porog*Point,High[2]+porog*Point-StopLoss*Point,Ord(cnt,VAL_TAKEPROFIT),Yellow); Exit; }; }; SetOrder(OP_BUYSTOP,Lots,High[2]+porog*Point,3,High[2]+porog*Point-StopLoss*Point,0,Red); }; //Нижний фрактал if High[2]High[2] and Open[1]<=Close[1] then { for cnt=1 to TotalTrades { If Ord(cnt,VAL_TYPE)=OP_SELL then exit; If Ord(cnt,VAL_TYPE)=OP_SELLSTOP then { if Ord(cnt,VAL_OPENPRICE)=Low[2]-porog*Point then exit; ModifyOrder(Ord(cnt,VAL_TICKET),Low[2]-porog*Point,Low[2]-porog*Point+StopLoss*Point,Ord(cnt,VAL_TAKEPROFIT),Yellow); Exit; }; }; SetOrder(OP_SELLSTOP,Lots,Low[2]-porog*Point,3,Low[2]-porog*Point+StopLoss*Point,0,Blue); }; //Рутина по работе с трэйлинг стопом if TStop<5 then Exit; for cnt=1 to TotalTrades { If Ord(cnt,VAL_TYPE)=OP_BUY then { If Bid-Ord(cnt,VAL_OPENPRICE)>TStop*Point then { If Ord(cnt,VAL_STOPLOSS)TStop*Point then { If Ord(cnt,VAL_STOPLOSS)>Ask+TStop*Point then { ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE),Ask+TStop*Point,Ord(cnt,VAL_TAKEPROFIT),Yellow); Exit; }; }; }; };