Time: 2013-01-18 | Download file:UpDn-Alexander_Piechotta-30.mq4
//+------------------------------------------------------------------+ extern double TakeProfit = 7; extern double Lots = 0.1; extern double TrailingStop = 5; extern double StopLoss = 30; int start() { double pos1pre=0; double pos2cur=0; int cnt=0; int mode=0; double openpozprice=0; pos1pre = iBullsPower(NULL,0,1,PRICE_WEIGHTED,1); pos2cur = iBullsPower(NULL,0,1,PRICE_WEIGHTED,0); //Comment("??????? ??????? ",pos2cur,"Previous pos", pos1pre ); if (pos1pre >pos2cur) { //????????? ??????? ??????? for (cnt=1; cnt(OrderOpenPrice()+TrailingStop*Point)) { OrderClose(OrderTicket(),OrderLots(),Bid,5,Violet); return(0); } } } } if (pos2cur<0) //????????? ???????? ??????? { for (cnt=1; cnt