any one could help me to put MAGIC NUMBER on this EA ?

to running in different cross simultanusly?

in this versione doesn't work.

thank's

NB!

------------------------------------------------------------------+

IDEA OF NICK 35

// Variabili esterne

extern int TP=50;

extern int SL=50;

extern int Trailing=500;

extern double LOTTI=0.1;

extern double Turbo_Viola=7;

extern double Turbo_Gialla=5;

extern int Livello_Turbo_Alto=70;

extern int Livello_Turbo_Basso=30;

extern int Ora_Inizio=3;

extern int Ora_Fine=20;

extern bool AutoMagicNumber = TRUE;

extern int Magic_Number = 20050610;

int init(){

}

int intersezione(

double valoreCandelaPrima1,

double valoreCandelaPrima2,

double valoreCandelaDopo1,

double valoreCandelaDopo2,

int limiteUp,

int limiteDown){

if (

(valoreCandelaPrima1>limiteUp) &&

(valoreCandelaPrima2>limiteUp) &&

(valoreCandelaPrima1>=valoreCandelaPrima2) &&

(valoreCandelaDopo1<valoreCandelaDopo2))

return (1); //Incrocia sopra limiteUp

else if (

(valoreCandelaPrima1<limiteDown) &&

(valoreCandelaPrima2<limiteDown) &&

(valoreCandelaPrima1<=valoreCandelaPrima2) &&

(valoreCandelaDopo1>valoreCandelaDopo2))

return (2); //Incrocia sopra limiteDown

}

int start(){

int stopLoss=SL;

int takeProfit=TP;

int TrailingStop=Trailing;

double lotti=LOTTI;

double turboGialla=Turbo_Gialla;

double turboViola=Turbo_Viola;

int livelloTurboAlto=Livello_Turbo_Alto;

int livelloTurboBasso=Livello_Turbo_Basso;

int i, p, incrocio;

double turboJrsxViola[3]; //Array valori turbo

double turboJrsxGiallo[3]; //Array valori turbo

int ticket;

static datetime LastClosedBar =D'1980.01.1';

int ore=TimeHour(TimeCurrent());

int oraInizio=Ora_Inizio;

int oraFine=Ora_Fine;

double macdVerde, macdRossa, macdValore, macdOrizzontaleSopra, macdOrizzontaleSotto;

for (i=0;i<3;i++){

turboJrsxViola[i] = iCustom(NULL,0,"Turbo_JRSX",7,0,i); //Viola

turboJrsxGiallo[i] = iCustom(NULL,0,"Turbo_JRSX",5,0,i); //Giallo

}

macdVerde = iCustom(NULL,0,"BarScalper MACD",3,5,5,13,55,0.8,0,1);

macdRossa = iCustom(NULL,0,"BarScalper MACD",3,5,5,13,55,0.8,1,1);

macdValore = iCustom(NULL,0,"BarScalper MACD",3,5,5,13,55,0.8,2,1);

macdOrizzontaleSopra = iCustom(NULL,0,"BarScalper MACD",3,5,5,13,55,0.8,3,1);

macdOrizzontaleSotto = iCustom(NULL,0,"BarScalper MACD",3,5,5,13,55,0.8,4,1);

incrocio=intersezione(

turboJrsxGiallo[2],

turboJrsxViola[2],

turboJrsxGiallo[1],

turboJrsxViola[1],

livelloTurboAlto,

livelloTurboBasso);

if (AutoMagicNumber)

if(OrdersTotal()<1){

if (incrocio==2 && ore>oraInizio && ore<oraFine && macdValore<macdOrizzontaleSotto)

OrderSend(Symbol(),OP_BUY,lotti,Ask,3,Ask-stopLoss*Point,Ask+takeProfit*Point,"Fast and Furious",16384,0,Green);

if (incrocio==1 && ore>oraInizio && ore<oraFine && macdValore>macdOrizzontaleSopra)

OrderSend(Symbol(),OP_SELL,lotti,Bid,3,Ask+stopLos s*Point,Bid-takeProfit*Point,"Fast and Furious",16384,0,Red);

}

for(p=0;p<OrdersTotal();p++){

OrderSelect(p, SELECT_BY_POS, MODE_TRADES);

if(OrderType()<=OP_SELL && // Cerco la posizione aperta

OrderSymbol()==Symbol()&& OrderMagicNumber()==Magic_Number) // Una volta trovate guardo su che simbolo siamo

{

if(OrderType()==OP_BUY){

if (turboJrsxViola[0]>110)

OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet) ;

}

if(TrailingStop>0){

if(Bid-OrderOpenPrice()>Point*TrailingStop){

if(OrderStopLoss()<Bid-Point*TrailingStop){

OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green);

return(0);

}

}

}

else{

if(turboJrsxViola[0]<-10)

OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet) ;

}

if(TrailingStop>0){

if((OrderOpenPrice()-Ask)>(Point*TrailingStop)){

if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0)){

OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Poi nt*TrailingStop,OrderTakeProfit(),0,Red);

return(0);

}

}

}

}

}

Comment(

"\n",

"------ Segnali ------\n",

"macdVerde: ",macdVerde,"\n",

"macdRossa: ",macdRossa,"\n",

"macdValore: ",macdValore,"\n",

"macdOrizzontaleSopra: ",macdOrizzontaleSopra,"\n",

"macdOrizzontaleSotto: ",macdOrizzontaleSotto,"\n"

);

return(0);

}