Pagina 2 di 4

Re: Broker BO MT4 e gli EA

Inviato: 28/07/2015, 22:32
da carlo10
Ciao rikis91, ho unito il tuo messaggio in questa discussione che ha qualche consiglio utile al tuo scopo.

Re: Broker BO MT4 e gli EA

Inviato: 05/08/2015, 21:16
da rikis91
ciao a tutti io volevo automatizzare questo indicatore che apra in automatico operazioni binarie con scadenza 5 min alla chiusura della candela nell'istante che manda l'alert deve aprire una operazione.
logicamente anche dietro compenso per chi mi aiuterà....
allego conversazione che potrebbe esservi utile broker-opzioni-binarie-mt4-ea-t1301.html


//+------------------------------------------------------------------+
//| RSI + ADX
//+------------------------------------------------------------------+
#property copyright ""
#property link ""

#property indicator_separate_window
#property indicator_buffers 5
#property indicator_color1 Black
#property indicator_color2 LimeGreen
#property indicator_color3 LimeGreen
#property indicator_color4 Red
#property indicator_color5 Red
#property indicator_width1 2
#property indicator_width2 5
#property indicator_width3 5
#property indicator_width4 5
#property indicator_width5 5
#property indicator_minimum 0
#property indicator_maximum 100

//
//
//
//
//

extern string TimeFrame = "Current time frame";
extern string separator4 = "Parametri RSI";
extern int Length = 14;
extern int Price = PRICE_CLOSE;
extern double LevelUp = 70;
extern double LevelDown = 30;
extern bool alertsOn = true;
extern bool alertsOnZoneEnter = true;
extern bool alertsOnZoneExit = false;
extern string separator3 = "Parametri ADX";
extern int AdxPeriod = 14;
extern int AdxPrice = PRICE_CLOSE;
extern int AdxLevel = 25;

extern string separator1 = "Parametri Alert";
extern bool alertsOnCurrent = false;
extern bool alertsMessage = true;
extern bool alertsSound = false;
extern bool alertsNotify = true;
extern bool alertsEmail = false;

//
//
//
//
//

double rsi[];
double rsiUa[];
double rsiUb[];
double rsiDa[];
double rsiDb[];
double trend[];
double adx;
//
//
//
//
//

string indicatorFileName;
bool returnBars;
bool calculateValue;
int timeFrame;

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//

int init()
{
IndicatorBuffers(6);
SetIndexBuffer(0,rsi);
SetIndexBuffer(1,rsiUa);
SetIndexBuffer(2,rsiUb);
SetIndexBuffer(3,rsiDa);
SetIndexBuffer(4,rsiDb);
SetIndexBuffer(5,trend);
Length = MathMax(Length ,1);

//
//
//
//
//

indicatorFileName = WindowExpertName();
calculateValue = TimeFrame=="calculateValue"; if (calculateValue) { return(0); }
returnBars = TimeFrame=="returnBars"; if (returnBars) { return(0); }
timeFrame = stringToTimeFrame(TimeFrame);

//
//
//
//
//

string PriceType;
switch(Price)
{
case PRICE_CLOSE: PriceType = "Close"; break; // 0
case PRICE_OPEN: PriceType = "Open"; break; // 1
case PRICE_HIGH: PriceType = "High"; break; // 2
case PRICE_LOW: PriceType = "Low"; break; // 3
case PRICE_MEDIAN: PriceType = "Median"; break; // 4
case PRICE_TYPICAL: PriceType = "Typical"; break; // 5
case PRICE_WEIGHTED: PriceType = "Weighted"; break; // 6
}

//
//
//
//
//

SetLevelValue(0,LevelUp);
SetLevelValue(1,LevelDown);
IndicatorShortName(timeFrameToString(timeFrame)+" RSI+ADX Mio Metodo ("+Length+","+PriceType+")");
return(0);
}
int deinit()
{

return(0);
}

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//

int start()
{
int counted_bars=IndicatorCounted();
int i,limit;

if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit = MathMin(Bars-counted_bars,Bars-1);
if (returnBars) { rsi[0] = MathMin(limit+1,Bars-1); return(0); }

//
//
//
//
//
//

if (calculateValue || timeFrame == Period())
{
if (!calculateValue && trend[limit]== 1) CleanPoint(limit,rsiUa,rsiUb);
if (!calculateValue && trend[limit]==-1) CleanPoint(limit,rsiDa,rsiDb);
for(i=limit; i >= 0; i--)
{
rsi = iRSI(NULL,0,Length,Price,i);
adx = iADX(NULL,0,AdxPeriod,AdxPrice,0,i);
rsiUa = EMPTY_VALUE;
rsiUb = EMPTY_VALUE;
rsiDa = EMPTY_VALUE;
rsiDb = EMPTY_VALUE;
trend = trend[i+1];
if (rsi[i+1]<rsi[i+2] && rsi[i+1]<=65 && rsi>=LevelUp && rsi<=75 && adx<=AdxLevel)trend= 1;
if (rsi[i+1]>rsi[i+2] && rsi[i+1]>=35 && rsi<=LevelDown && rsi[i]>=25 && adx<=AdxLevel)trend[i]=-1;
if (rsi[i]<LevelUp && rsi[i]>LevelDown) trend[i]= 0;
if (!calculateValue && trend[i] == 1) PlotPoint(i,rsiUa,rsiUb,rsi);
if (!calculateValue && trend[i] == -1) PlotPoint(i,rsiDa,rsiDb,rsi);
}
manageAlerts();
return(0);
}

//
//
//
//
//

limit = MathMax(limit,MathMin(Bars-1,iCustom(NULL,timeFrame,indicatorFileName,"returnBars",0,0)*timeFrame/Period()));
if (trend[limit]== 1) CleanPoint(limit,rsiUa,rsiUb);
if (trend[limit]==-1) CleanPoint(limit,rsiDa,rsiDb);
for (i=limit;i>=0;i--)
{
int y = iBarShift(NULL,timeFrame,Time[i]);
rsi[i] = iCustom(NULL,timeFrame,indicatorFileName,"calculateValue",Length,Price,LevelUp,LevelDown,alertsOn,alertsOnZoneEnter,alertsOnZoneExit,alertsOnCurrent,alertsMessage,alertsSound,alertsEmail,0,y);
trend[i] = iCustom(NULL,timeFrame,indicatorFileName,"calculateValue",Length,Price,LevelUp,LevelDown,alertsOn,alertsOnZoneEnter,alertsOnZoneExit,alertsOnCurrent,alertsMessage,alertsSound,alertsEmail,5,y);
rsiUa[i] = EMPTY_VALUE;
rsiUb[i] = EMPTY_VALUE;
rsiDa[i] = EMPTY_VALUE;
rsiDb[i] = EMPTY_VALUE;
if (trend[i]== 1) PlotPoint(i,rsiUa,rsiUb,rsi);
if (trend[i]==-1) PlotPoint(i,rsiDa,rsiDb,rsi);
}
return(0);
}

//+-------------------------------------------------------------------
//|
//+-------------------------------------------------------------------
//
//
//
//
//

void manageAlerts()
{
if (!calculateValue && alertsOn)
{
if (alertsOnCurrent)
int whichBar = 0;
else whichBar = 1;
if (trend[whichBar] != trend[whichBar+1])
{
if (alertsOnZoneEnter && trend[whichBar] == 1) doAlert(whichBar,DoubleToStr(LevelUp,2) +" ");
if (alertsOnZoneEnter && trend[whichBar] == -1) doAlert(whichBar,DoubleToStr(LevelDown,2)+" ");
if (alertsOnZoneExit && trend[whichBar+1] == -1) doAlert(whichBar,DoubleToStr(LevelDown,2)+" ");
if (alertsOnZoneExit && trend[whichBar+1] == 1) doAlert(whichBar,DoubleToStr(LevelUp,2) +" ");
}
}
}

//
//
//
//
//

void doAlert(int forBar, string doWhat)
{
static string previousAlert="nothing";
static datetime previousTime;
string message;

if (previousAlert != doWhat || previousTime != Time[forBar]) {
previousAlert = doWhat;
previousTime = Time[forBar];

//
//
//
//
//

message = StringConcatenate(Symbol()," -- ",Period()," Min -- ",DoubleToStr(Bid,Digits)," -- ",TimeToStr(TimeLocal(),TIME_SECONDS)," -- RSI ",doWhat);
if (alertsMessage) Alert(message);
if (alertsNotify) SendNotification(message);
if (alertsEmail) SendMail(StringConcatenate(Symbol(),"rsi"),message);
if (alertsSound) PlaySound("alert2.wav");
}
}

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//

void CleanPoint(int i,double& first[],double& second[])
{
if ((second[i] != EMPTY_VALUE) && (second[i+1] != EMPTY_VALUE))
second[i+1] = EMPTY_VALUE;
else
if ((first[i] != EMPTY_VALUE) && (first[i+1] != EMPTY_VALUE) && (first[i+2] == EMPTY_VALUE))
first[i+1] = EMPTY_VALUE;
}

//
//
//
//
//

void PlotPoint(int i,double& first[],double& second[],double& from[])
{
if (first[i+1] == EMPTY_VALUE)
{
if (first[i+2] == EMPTY_VALUE) {
first[i] = from[i];
first[i+1] = from[i+1];
second[i] = EMPTY_VALUE;
}
else {
second[i] = from[i];
second[i+1] = from[i+1];
first[i] = EMPTY_VALUE;
}
}
else
{
first[i] = from[i];
second[i] = EMPTY_VALUE;
}
}

//+-------------------------------------------------------------------
//|
//+-------------------------------------------------------------------
//
//
//
//
//

string sTfTable[] = {"M1","M5","M15","M30","H1","H4","D1","W1","MN"};
int iTfTable[] = {1,5,15,30,60,240,1440,10080,43200};

//
//
//
//
//

int stringToTimeFrame(string tfs)
{
tfs = stringUpperCase(tfs);
for (int i=ArraySize(iTfTable)-1; i>=0; i--)
if (tfs==sTfTable[i] || tfs==""+iTfTable[i]) return(MathMax(iTfTable[i],Period()));
return(Period());
}
string timeFrameToString(int tf)
{
for (int i=ArraySize(iTfTable)-1; i>=0; i--)
if (tf==iTfTable[i]) return(sTfTable[i]);
return("");
}

//
//
//
//
//

string stringUpperCase(string str)
{
string s = str;

for (int length=StringLen(str)-1; length>=0; length--)
{
int tchar = StringGetChar(s, length);
if((tchar > 96 && tchar < 123) || (tchar > 223 && tchar < 256))
s = StringSetChar(s, length, tchar - 32);
else if(tchar > -33 && tchar < 0)
s = StringSetChar(s, length, tchar + 224);
}
return(s);
}

Re: Broker BO MT4 e gli EA

Inviato: 11/08/2015, 2:54
da marcosdnm
Hello,

I'm using the OrderSend() function in my EA as stated by neo1777 but I'm facing the 4112 error code. My broker is GDMFX. Could someone help me?

Re: Broker BO MT4 e gli EA

Inviato: 14/08/2015, 16:08
da omarsar
Ciao a tutti qualcuno ha proseguito nello sviluppo dell EA per ob ???
Buon ferragosto a tutto il forum :-)

Re: EA Per opzioni binarie

Inviato: 27/11/2015, 17:25
da Paperik
rikis91 ha scritto:Qualcuno di voi ha mai creato un ea che quando si verificano determinati parametri entra in automatico con una scedenza preselezinata in opzioni binarie???
Ciao Rikis91, si io faccio degli ea per le binarie, alla ricerca di un ea profittevole.

Re: EA Per opzioni binarie

Inviato: 14/01/2016, 22:55
da rikis91
Paperik ha scritto:
rikis91 ha scritto:Qualcuno di voi ha mai creato un ea che quando si verificano determinati parametri entra in automatico con una scedenza preselezinata in opzioni binarie???
Ciao Rikis91, si io faccio degli ea per le binarie, alla ricerca di un ea profittevole.

Io finalmente sono riuscito a fare un ea per ob sul broker gbmfx
Ora vorrei fare un programma che utilizzi l'ea creato da me su un conto demo e che apra allo stesso tempo anche su un conto live su 24option tipo ma non so nemmeno dove iniziare qualcuno sa darmi una mano

Re: Broker BO MT4 e gli EA

Inviato: 15/01/2016, 0:05
da bsmile
Ciao Rikis,
sono un programmatore e affronterei la questione così:

1) invio del segnale all'esterno di meta trader (es. sms, email, sito)
2) inserimento dell'ordine sul sito di ob

Il primo punto si fa semplicemente tramite il linguaggio mql4 e un'interfaccia esterna che riceva il messaggio.
Il secondo punto è un pò più complesso ma si può fare...

Il progetto interessa anche me, se vuoi ci lavoriamo insieme ma... hai testao l'ea? funziona? :green:

Re: Broker BO MT4 e gli EA

Inviato: 15/01/2016, 0:42
da rikis91
bsmile ha scritto:Ciao Rikis,
sono un programmatore e affronterei la questione così:

1) invio del segnale all'esterno di meta trader (es. sms, email, sito)
2) inserimento dell'ordine sul sito di ob

Il primo punto si fa semplicemente tramite il linguaggio mql4 e un'interfaccia esterna che riceva il messaggio.
Il secondo punto è un pò più complesso ma si può fare...

Il progetto interessa anche me, se vuoi ci lavoriamo insieme ma... hai testao l'ea? funziona? :green:

L'ea è stato testato da luglio 2015 ad ora live sul broker gdmfx. Tuttora lo sto usando live con ottimi risultati siamo al 75% totale ci sono stati mesi chiusi al 80% e mesi un po' meno bene ma mai sotto al 70% di operazioni prese e direi che sono ottimi risultati.... Io vorrei utilizzare un broker come 24option ma loro non permettono l'uso di exper advisor e non danno la mt4 io non sono un programmatore ma semplicemente uno smanettone

Re: Broker BO MT4 e gli EA

Inviato: 15/01/2016, 0:54
da bsmile
con quali time frame lavori?
ti chiedo questo per capire se, almeno per una prima fase, possa essere sufficiente farsi inviare i segnali dall'ea per inserire manualmente l'ordine sulla piattaforma di ob.

se hai voglia di condividere, posso provare a modificarlo e farti ricevere i segnali nella tua casella email.

Re: Broker BO MT4 e gli EA

Inviato: 15/01/2016, 8:30
da rikis91
bsmile ha scritto:con quali time frame lavori?
ti chiedo questo per capire se, almeno per una prima fase, possa essere sufficiente farsi inviare i segnali dall'ea per inserire manualmente l'ordine sulla piattaforma di ob.

se hai voglia di condividere, posso provare a modificarlo e farti ricevere i segnali nella tua casella email.


Lavora a tf 5 min e ogni evento apre 2 posizione con scadenza 5 e 10 minuti per farle arrivare alla email non è un problema sono capace anche io il problema è farle aprire nel broker deve fare tutto in automatico se vuoi che le prenda a dei livelli accettabili perché si solito scende subito appena tocca