Adviser to the whole world - page 78

 

Actually... search the web for videos of ready-made Arbitrage robots... I would have put them here - but they do not load on the site - they take from 20-100-400 megabytes :)

look how it's done ... what they calculate :) what parameters ... and maybe you'll find something useful for yourself :)

 

new-rena: А размер лота? Или пипсы считать только?

For example for pair EurUsd(lot=1) GbpUsd(lot=0.8) - there will be a virtual leg - count Pips - total for it, multiply by 0.8(lot) ....
 
I think it would not hurt to introduce additional conditions when opening a pair of trades - counter-trend breaks in both pairs ... (... for example a reversal of stochastics or something... ) otherwise we open only at a distance...
 
sllawa3:
I think it would not hurt to introduce additional conditions when opening a pair of trades - counter-trend breaks in both pairs... ( e.g. stochastic breaks or whatever... )
it's not worth it... really ... only work :) with a spread :)
 
sllawa3:
I think it would not hurt to introduce additional conditions when opening a pair of trades - counter-trend breaks in both pairs... ( e.g. stochastic breaks or whatever... )


Take the block of virtual trades from here. I did it but not yet finished:


#property copyright ""
#property link ""

#property indicator_separate_window
#property indicator_buffers 3

#property indicator_color1 Blue // Line colour
#property indicator_color2 Red // Line colour
#property indicator_color3 Yellow //Line colour
//extern color color color1 =Blue;
//extern color color2 =Red;
//extern color color3 =Yellow;

extern string s1="Extension";
extern string myshka=20;
extern string s2="Main pair";
extern string Symb="EURUSDFXF";
extern string s3="Indicator Pair";
extern string SymbPara="GBPUSDFXF";
extern string s4="Analysis Period";
extern string Analiz_Period="PERIOD_M1";

int OpenedLots=0;
double SellGbpUsd=0;
double BuyEurUsd=0;
double BuyGbpUsd=0;
double SellEurUsd=0;
double Res_SGU_BEU=0;
double Res_BGU_SEU=0;
double BuyEurUsd_Buf[];
double SellGbpUsd_Buf[];
double Res_SGU_BEU_Buf[];
double Lots;
double LotsPara;
double ValuePara;
double Value;
double IndicatorPara;
datetime BarTime;
int Ticket_TicketPara;
int i=0;
int k=0;

//withdraws the bargains to the current window
//+------------------------------------------------------------------+
int init()
{
SetIndexBuffer(0,BuyEurUsd_Buf); // assigning an array to the buffer
SetIndexBuffer(1,SellGbpUsd_Buf); // assigning the array to the buffer
SetIndexBuffer(2,Res_SGU_BEU_Buf); // assigning the array to the buffer
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);//Line style
SetIndexStyle (1,DRAW_LINE,STYLE_SOLID,2);//Line style
SetIndexStyle (2,DRAW_LINE,STYLE_SOLID,2);//Line style
SetIndexLabel (0, "BuyEurUsd");
SetIndexLabel (1, "SellGbpUsd");
SetIndexLabel (2, "Res_SGU_BEU");
SetLevelValue (0, 25); // Horizon line level set.
SetLevelValue (1,-25); // set another level
start();
return; // Exit init()
} //end init()
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
int start()
{
//for (int i = WindowFirstVisibleBar(); i >= 0; i--)
//for (int i = Bars; i > 0; i--)
for (int i = 0; i <= Bars; i++)
{
ValuePara=iOpen(SymbPara,Analiz_Period,i);
Value=iOpen(Symb,Analiz_Period,i);
BarTime=iTime(Symb,Analiz_Period,i);
IndicatorPara=iCustom(Symb,Analiz_Period, "MultiInstrument_NEW_RENA",Blue,Red,SymbPara,0,i);

if (MathAbs(Value-IndicatorPara)>myshka*Point && OpenedLots==0)
{
if(Value>IndicatorPara)
{
SellEurUsd=SellEurUsd+Value;
BuyGbpUsd=BuyGbpUsd-ValuePara;
Ticket_TicketPara=1;
OpenedLots=2;
}
if(Value<IndicatorPara)
{// THIS
BuyEurUsd=BuyEurUsd-Value;
SellGbpUsd=SellGbpUsd+ValuePara;
Ticket_TicketPara=0;
OpenedLots=2;
}
}
if (Ticket_TicketPara==1 && OpenedLots==2 && Value<IndicatorPara)
{
SellEurUsd=SellEurUsd-Value;
BuyGbpUsd=BuyGbpUsd+ValuePara;
Res_BGU_SEU=Res_BGU_SEU+SellEurUsd+BuyGbpUsd;
OpenedLots=0;
}
if (Ticket_TicketPara==0 && OpenedLots==2 && Value>IndicatorPara)
{// THIS
BuyEurUsd=BuyEurUsd+Value;
SellGbpUsd=SellGbpUsd-ValuePara;
Res_SGU_BEU=Res_SGU_BEU+BuyEurUsd+SellGbpUsd;
OpenedLots=0;
k=k+1;
BuyEurUsd_Buf[k]=BuyEurUsd;
SellGbpUsd_Buf[k]=SellGbpUsd;
Res_SGU_BEU_Buf[k]=Res_SGU_BEU;
}
}
return(0);
}
:

 
back to VIDEOs of real trading robots - I'll look for links... Download some videos... See who's using what... Maybe you'll get an idea - :)))
 
I'm wondering whether it makes sense to introduce a stop on equity drawdown or not...
 
sllawa3:
I wonder whether it makes sense to enter a stop on Equity drawdown or not ...

No need :) In reality, when you have a drawdown - manipulating lots - going to one leg or the other - ALL trades go to + :) - but... one might try ... collect statistics

which is better... or use stops to close... or wait until the victory (with topping up) - it worked for me... :)

 
Stops of each order is out of the question... they are traded in pairs... only on equity... and that's not even worth it...
 
another suggestion... besides comparing charts of 2 pairs, we should also introduce several charts... and allow trades on these 2 pairs if one-legged arbitrage conditions exist... on the main pair