← Назад к списку файлов

robot_powerm5-m .mq4

Поиск по коду файла

/*[[
        Name := Robot_PowerM5_demo
        Author := MT
        Link := 
        Notes := M5 for all majors
        Lots := 1.00
        Stop Loss := 45
        Take Profit := 150
        Trailing Stop := 15
]]*/

extern double slippage=20,mm=1,risk=7.5,Lot=0.1,StopLoss=45,TakeProfit=150, TrailingStop=15;

int start()
  {
      // код доступен только после оплаты
   }

double bull=0,bear=0,sl=0,tp=0,cnt=0,b=0,s=0,Opentrades=0,lotsi=0,ITB=0,ITS=0,total=0;

ITB=iCustom(NULL,0,"iTrend",2,0,0,20,0,14,0,0,1);

ITS=iCustom(NULL,0,"iTrend",2,0,0,20,0,14,0,1,1);

bull = iBullsPower(NULL,0,5,PRICE_CLOSE,1);
bear = iBearsPower(NULL,0,5,PRICE_CLOSE,1);
Comment("bull+bear= ",bull + bear,"\n I Blue ",ITB,"\n I Red ",ITS);

Opentrades=0;

total=OrdersTotal();
for(cnt=0;cnt<total;cnt++)
{ 
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      if ( OrderSymbol()==Symbol() ) Opentrades = Opentrades+1;  
}

if (mm != 0) 
        lotsi=MathCeil(AccountBalance()*risk/10000)/10;
else
        lotsi=Lot;

if (Opentrades == 0) 
   {
   if ((bull + bear > 0) && (ITB == 1) && (ITS == 0)) 
      {
      sl = Ask - StopLoss * Point;
      tp = Bid + TakeProfit * Point;
      OrderSend(Symbol(),OP_BUY,lotsi,Ask,slippage,sl,tp,0,0,Blue);
      }
   if ((bull + bear < 0) && (ITS == -1) && (ITB == 0))
      {
      sl = Bid + StopLoss * Point;
      tp = Ask - TakeProfit * Point;
      OrderSend(Symbol(),OP_SELL,lotsi,Bid,slippage,sl,tp,0,0,Red);
      }
   }

b = 1 * Point + 

Показано первые 50% кода (символов: 2039)

Как получить полную версию?

Введите ваш email и нажмите кнопку, чтобы перейти к оплате.