Has anyone withdrawn money from a broker using arbitrage strategies? - page 15

 

Arbitrators in general are inherently simple, their strength is in speed, and there is little logic there.

For example, here's the whole arbitrator, one foot, the other the same thing, but in reverse.

void OnTick()
  {
//---
   if(IsTradeAllowed()==false)return;
   double LastLot=0;
   while(!IsStopped())
   {
      if(IsTradeAllowed()==false)return;
      if(AccountFreeMargin()/AccountBalance()<0.3)
      {
         Sleep(1000);
         continue;
      }
      //double randB=(MathRand()/32768.0);
      //Percent=iATR(NULL,1,14,0)/100;
      //if(Percent<0.004)Percent=0.004; NMCUSD = NMCBTC/BTCUSD
      //Ask_Buy=Ask_LTCUSD/Bid_LTCBTC;
      //Ask_LTCUSD=Ask_Buy*Bid_LTCBTC
      double Bid_LTCBTC=MarketInfo("LTCBTC",MODE_BID);//-0.005*MarketInfo("LTCBTC",MODE_BID);
      double Ask_BTCUSD=MarketInfo("BTCUSD",MODE_ASK);//-0.005*MarketInfo("BTCUSD",MODE_BID);
      double Ask_LTCBTC=MarketInfo("LTCBTC",MODE_ASK);//+0.005*MarketInfo("LTCBTC",MODE_ASK);
      double Bid_BTCUSD=MarketInfo("BTCUSD",MODE_BID);//+0.005*MarketInfo("BTCUSD",MODE_ASK);
      LotDepo=(AccountBalance()*0.001)*Bid_BTCUSD*PercentDepo;
      double    Ask_Buy=Bid_BTCUSD*Bid_LTCBTC;
      double    Bid_Sell=Ask_BTCUSD*Ask_LTCBTC;
      double StepB=Ask_Buy-(Ask_Buy*Percent);
      //double randS=(MathRand()/32768.0);
      double StepS=Bid_Sell+(Bid_Sell*Percent);
      Comment(StepS," ",Bid_BTCUSD," ",Bid_LTCBTC);
      RefreshRates();
      //WindowRedraw();
      //Comment(GetTickCount()," ",StepB, " ",StepS, "Bid: ",Bid," Ask: ",Ask);
      int tSL=0,tBL=0;
      for(int i=OrdersTotal()-1;i>=0;i--)
      {
         if(OrderSelect(i,SELECT_BY_POS)&&OrderMagicNumber()==magik)
         {
            int cmd=OrderType();
            if(cmd==OP_SELLLIMIT)
            {
               tSL++;
               tick=OrderTicket();
               //OrderDelete(OrderTicket());
               if(MathAbs(NormalizeDouble(OrderOpenPrice(),Digits)-NormalizeDouble(StepS,Digits))>0.000001)
               {
                  if(StepS<Bid)
                     OrderModify(OrderTicket(),NormalizeDouble(Bid,Digits),0,0,0);
                  else
                     OrderModify(OrderTicket(),NormalizeDouble(StepS,Digits),0,0,0);
                  //Print(GetLastError());
               }
               if(LastLot>OrderLots())
               {
                  if(OrderDelete(OrderTicket()))
                  LastLot=LastLot-OrderLots();
               }
            }
         }
      }
      if(tSL==0)
      {
         if(StepS<Bid)
         {
            if(LastLot>=MarketInfo("LTCBTC",MODE_MINLOT))
            {
               OrderSend("LTCBTC",OP_BUY,LastLot,NormalizeDouble(MarketInfo("LTCBTC",MODE_ASK),int(MarketInfo("LTCBTC",MODE_DIGITS))),200000,0,0,NULL,magik,0);
               OrderSend("BTCUSD",OP_BUY,NL("BTCUSD",LastLot*MarketInfo("LTCBTC",MODE_ASK)),NormalizeDouble(MarketInfo("BTCUSD",MODE_ASK),int(MarketInfo("BTCUSD",MODE_DIGITS))),200000,0,0,NULL,magik,0);
            }
            Lot=/*LotDepo;*/ NL(Symbol(),LotDepo/Bid);
            OrderSend(Symbol(),OP_SELLLIMIT,Lot,NormalizeDouble(Bid,Digits),200000,0,0,NULL,magik,0);
            LastLot=Lot;
         }
         else
         {
            if(LastLot>=MarketInfo("LTCBTC",MODE_MINLOT))
            {
               OrderSend("LTCBTC",OP_BUY,LastLot,NormalizeDouble(MarketInfo("LTCBTC",MODE_ASK),int(MarketInfo("LTCBTC",MODE_DIGITS))),200000,0,0,NULL,magik,0);
               OrderSend("BTCUSD",OP_BUY,NL("BTCUSD",LastLot*MarketInfo("LTCBTC",MODE_ASK)),NormalizeDouble(MarketInfo("BTCUSD",MODE_ASK),int(MarketInfo("BTCUSD",MODE_DIGITS))),200000,0,0,NULL,magik,0);
            }
            Lot=/*LotDepo;*/ NL(Symbol(),LotDepo/StepS);
            OrderSend(Symbol(),OP_SELLLIMIT,Lot,NormalizeDouble(StepS,Digits),200000,0,0,NULL,magik,0);
            LastLot=Lot;
         }
      }
      Sleep(1);
   }
     }
 
Alexandr Bryzgalov:

I made it "simpler", I built an off-line spread chart and ran scripts on it, the convenience is that all data is ready and the indicators are calculated

a simple chart or a Bollinger was used for searching for the average spread value

The arbitrage script itself is run on this chart; this scheme greatly speeds up the script operation.

The average wasn't changing fast, so I entered shifts from horizontal lines

I used to do something similar. I was writing tics into a file. From the file an offline ticks/spreads chart was created using a simple indicator + indicator-tester, which produced the following picture

Red - profit . Green/yellow - long/short. White - comis

 
For some reason I haven't seen arbitrageurs in the top broker account rankings, and they could at least trick subscribers into taking extra profits in autocopying services by charging them a commission. Or just couldn't identify that it was exactly arbitrage. For the most part they are not very long-lived martingales, but there are exceptions that are at the top for the year.