Переделанный лаки, вполне работоспособен, тестировался на демо, на EURGBP неплохие результаты показал.
Отредактировано Razboynik (2009-01-01 09:57:43)
ROBOTRADING - Форум по автоматизированной и ручной торговле на финансовых рынках. |
Привет, Гость! Войдите или зарегистрируйтесь.
Вы здесь » ROBOTRADING - Форум по автоматизированной и ручной торговле на финансовых рынках. » Эксперты » Пипсовщик Your_Lucky_EURGBP. Супер крутой и супер новый.
Переделанный лаки, вполне работоспособен, тестировался на демо, на EURGBP неплохие результаты показал.
Отредактировано Razboynik (2009-01-01 09:57:43)
И конечно-же добавлю нашего старого знакомого - lucky_2.4 (в исходнике). Как же без него?
не получается скачать. Можете здесь выложить?
не получается скачать. Можете здесь выложить?
Сейчас проверил - скачал без проблем. Возможно, когда Вы пробовали скачать, на файлообменнике праздники отмечали
Добавил еще две ссылки: если не скачивается с одной, качаем с другой и т.д.
Спасибо, скачал.
Вот этот?
//+------------------------------------------------------------------+ //| Your_Lucky_EURGBP_rdb_v1c.mq4 | //+------------------------------------------------------------------+ //====================================================================================================================================================== //salam salut saya untuk semua mql coder... //selain versi EURGBP ini masih banyak versi lain yang siap kami share kepada teman-teman semua... //mohon kiranya jika anda menggunakan script ini... jangan menghapus baris permintaan donasi... salam coder... semoga sukses... //====================================================================================================================================================== extern string Original_EA = "MyLuckyPro V.0.4p"; extern string Created_by = "Mr. Awangk"; extern string LastEdit_by = "_rdb_ : 08 Desember 2008"; extern string Expert_Name = "Your_Lucky_v1c"; extern bool CloseAll_NOW = false; extern double TargetEquity = 3000000; extern int OpenHour = 22; extern int CloseHour = 5; extern double PointOfPair = 0.00001; //0.00001; extern bool LotsOptimized = true; extern int Risk = 50; extern double Lots = 0.1; extern double MaxLots = 100; extern double MinLots = 0.1; extern int TP = 70; extern int SLA = 180; extern int SLB = 280; extern int LotsDigit = 2; extern int Slippage = 30; extern double MaxSpread = 30; extern bool Time_Opened_Protection = TRUE; extern bool Use_Fractal_TP_SL = false; extern bool Fractal_TP = false; extern int F_TP = 40; extern bool Fractal_SL = false; extern int F_SL = 40; extern bool Hidden_TP = TRUE; extern bool Hidden_SL = TRUE; //====================================================================================================================================================== extern int MaxTrades = 5; extern int MaxTradePerBar = 2; extern int MaxTradePerPosition = 3; extern int IMA_PERIOD = 4; extern int MA_AngleZero_PERIOD = 14; extern int MA_AngleZero_Level = 1; extern int ADX_Period = 14; extern int ADX_Level = 27; //extern int FractalRange = 380; //extern int ATR_Level = 150; extern string email_YM = "abdulrahman_maros@yahoo.com"; extern string Need_Donation = "Abdul Rahman"; extern string Bank = "BCA : 7990026640"; extern string LibertyReserve = "U7067895"; extern int pips_1 = 30; //3; extern int pips_2 = 20; //2; extern int pips_3 = 0; //0; extern int pips_4 = 10; //1; extern int pips_5 = 40; //4; //====================================================================================================================================================== int TradePerBar = 0; double Last_BUY_OpenPrice = 0; double Last_SELL_OpenPrice = 0; int Magic = 11111; int BarCount = -1; int LimitTime_1 = 60; int LimitTime_2 = 140; int LimitTime_3 = 170; int LimitTime_4 = 200; int LimitTime_5 = 240; bool next_buy = true; bool next_sell = true; double LastUpFractal,LastDownFractal,TimeOfLastDownFractal,TimeOfLastUpFractal,LowRange,HighRange,PrevRange; double LastUpFractal_M30,LastDownFractal_M30,LastUpFractal_H1,LastDownFractal_H1,TimeOfLastDownFractal_H1,TimeOfLastUpFractal_H1; int FractalEnvelope=0,FractalEnvelope_H1=0,FractalEnvelope_M30=0; double midFractal=0,Fractal_SL_B1=0,Fractal_SL_S1=0; int CurrentATR=0,CurrentATR_H1=0; int LongHourForClose= 0; double tp = 0, sl=0; //====================================================================================================================================================== int init() { if(1==2 || 3==4 && 5==6) return (0); if(7==8 || 9==10 && 11==12) return (0); return(0); } //====================================================================================================================================================== int start() { //====================================================================================================================================================== if(CloseAll_NOW==true) { CloseAll(); return(0); } //====================================================================================================================================================== if (Ask - Bid > MaxSpread*PointOfPair) return (0); //====================================================================================================================================================== //Close with Equity if(TargetEquity>0 && AccountEquity() >= TargetEquity) { ForceCloseAll(); return(0); } //====================================================================================================================================================== int BUY_OpenPosition = 0; int SELL_OpenPosition = 0; int TOTAL_OpenPosition = 0; int Ticket = -1; int cnt = 0; for (cnt = 0; cnt < OrdersTotal(); cnt++) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderCloseTime()==0) { TOTAL_OpenPosition++; if (OrderType() == OP_BUY) { BUY_OpenPosition++; Last_BUY_OpenPrice = OrderOpenPrice(); } if (OrderType() == OP_SELL) { SELL_OpenPosition++; Last_SELL_OpenPrice = OrderOpenPrice(); } } } //====================================================================================================================================================== //double RSI_M1 = iRSI (Symbol(),PERIOD_M1,4,PRICE_OPEN,0); double MA_M1 = iCustom (Symbol(),PERIOD_M1 ,"MA_AngleZeroSigma",MA_AngleZero_PERIOD,1,0,0.2,6,0,9,1,"","",4,0); //double EvA_M5 = iEnvelopes(Symbol(),0,90,MODE_LWMA,0,PRICE_WEIGHTED,0.10,MODE_UPPER,0); //double EvB_M5 = iEnvelopes(Symbol(),0,90,MODE_LWMA,0,PRICE_WEIGHTED,0.10,MODE_LOWER,0); //double EvA2_M5 = iEnvelopes(Symbol(),0,30,MODE_LWMA,0,PRICE_WEIGHTED,0.10,MODE_UPPER,0); //double EvB2_M5 = iEnvelopes(Symbol(),0,30,MODE_LWMA,0,PRICE_WEIGHTED,0.10,MODE_LOWER,0); //====================================================================================================================================================== int a=1, s=2, i=0, g=0, y=0,r=0, d=0, q=0, z=0; for(a=1;a<Bars;a++){ if(iFractals(NULL, PERIOD_M15, MODE_UPPER,a)!=0){ LastUpFractal=iFractals(NULL, PERIOD_M15, MODE_UPPER,a); TimeOfLastUpFractal=Time[a]; break; }//end if }//end for for(r=1;r<Bars;r++){ if(iFractals(NULL, PERIOD_M15, MODE_LOWER,r)!=0){ LastDownFractal=iFractals(NULL, PERIOD_M15, MODE_LOWER,r); TimeOfLastDownFractal=Time[r]; break; }//end if }//end for for(y=1;y<Bars;y++){ if(iFractals(NULL, PERIOD_M30, MODE_UPPER,y)!=0){ LastUpFractal_M30=iFractals(NULL, PERIOD_M30, MODE_UPPER,y); break; }//end if }//end for for(g=1;g<Bars;g++){ if(iFractals(NULL, PERIOD_M30, MODE_LOWER,g)!=0){ LastDownFractal_M30=iFractals(NULL, PERIOD_M30, MODE_LOWER,g); break; }//end if }//end for for(s=1;s<Bars;s++){ if(iFractals(NULL, PERIOD_H1, MODE_UPPER,s)!=0){ LastUpFractal_H1=iFractals(NULL, PERIOD_H1, MODE_UPPER,s); break; }//end if }//end for for(d=1;d<Bars;d++){ if(iFractals(NULL, PERIOD_H1, MODE_LOWER,d)!=0){ LastDownFractal_H1=iFractals(NULL, PERIOD_H1, MODE_LOWER,d); break; }//end if }//end for //ObjectDelete("Fractal Fibo Retracement"); //ObjectCreate("Fractal Fibo Retracement",OBJ_FIBO,0,TimeOfLastUpFractal,LastUpFractal,TimeOfLastDownFractal,LastDownFractal); FractalEnvelope =MathRound((LastUpFractal-LastDownFractal)/PointOfPair); FractalEnvelope_M30 =MathRound((LastUpFractal_M30-LastDownFractal_M30)/PointOfPair); FractalEnvelope_H1 =MathRound((LastUpFractal_H1-LastDownFractal_H1)/PointOfPair); midFractal=0; midFractal=(LastUpFractal-((LastUpFractal-LastDownFractal)/2)); //CurrentATR=MathRound(iATR(Symbol(), PERIOD_M15,6,0)/PointOfPair); //CurrentATR_H1=MathRound(iATR(Symbol(), PERIOD_H1,4,0)/PointOfPair); bool FractalIsInsideEnvelope=false; if(Ask<=LastUpFractal_H1 && Bid>=LastDownFractal_H1){ FractalIsInsideEnvelope=true; }//end if //====================================================================================================================================================== if (Time_Opened_Protection == TRUE) { for (int j = 0; j < OrdersTotal(); j++) { OrderSelect(j, SELECT_BY_POS, MODE_TRADES); if (OrderType() == OP_BUY && (OrderMagicNumber() == Magic)) { if (TimeCurrent() - OrderOpenTime() > 60 * LimitTime_1 && TimeCurrent() - OrderOpenTime() < 60 * LimitTime_2 && Bid >= OrderOpenPrice() + pips_1 * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Orange); Print("Prot. Level 1 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } if (TimeCurrent() - OrderOpenTime() > 60 * LimitTime_2 && TimeCurrent() - OrderOpenTime() < 60 * LimitTime_3 && Bid >= OrderOpenPrice() + pips_2 * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Orange); Print("Prot. Level 2 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } if (TimeCurrent() - OrderOpenTime() > 60 * LimitTime_3 && TimeCurrent() - OrderOpenTime() < 60 * LimitTime_4 && Bid >= OrderOpenPrice() + pips_3 * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Orange); Print("Prot. Level 3 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } if (TimeCurrent() - OrderOpenTime() > 60 * LimitTime_4 && TimeCurrent() - OrderOpenTime() < 60 * LimitTime_5 && Bid >= OrderOpenPrice() - pips_4 * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Orange); Print("Prot. Level 4 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } if (TimeCurrent() - OrderOpenTime() > 60 * LimitTime_5 && Bid >= OrderOpenPrice() - pips_5 * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Orange); Print("Prot. Level 5 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } if (DayOfWeek() == 5 && Hour()>=CloseHour) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Orange); Print("Prot. Level 5 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } } //====================================================================================================================================================== if (OrderType() == OP_SELL && (OrderMagicNumber() == Magic)) { if (TimeCurrent() - OrderOpenTime() > 60 * LimitTime_1 && TimeCurrent() - OrderOpenTime() < 60 * LimitTime_2 && Ask <= OrderOpenPrice() - pips_1 * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Orange); Print("Prot. Level 1 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } if (TimeCurrent() - OrderOpenTime() > 60 * LimitTime_2 && TimeCurrent() - OrderOpenTime() < 60 * LimitTime_3 && Ask <= OrderOpenPrice() - pips_2 * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Orange); Print("Prot. Level 2 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } if (TimeCurrent() - OrderOpenTime() > 60 * LimitTime_3 && TimeCurrent() - OrderOpenTime() < 60 * LimitTime_4 && Ask <= OrderOpenPrice() - pips_3 * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Orange); Print("Prot. Level 3 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } if (TimeCurrent() - OrderOpenTime() > 60 * LimitTime_4 && TimeCurrent() - OrderOpenTime() < 60 * LimitTime_5 && Ask <= OrderOpenPrice() + pips_4 * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Orange); Print("Prot. Level 4 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } if (TimeCurrent() - OrderOpenTime() > 60 * LimitTime_5 && Ask <= OrderOpenPrice() + pips_5 * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Orange); Print("Prot. Level 5 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } if (DayOfWeek() == 5 && Hour()>=CloseHour) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Orange); Print("Prot. Level 5 - Close Price :" + DoubleToStr(OrderClosePrice(), Digits) + " Lots : " + DoubleToStr(OrderLots(), 2) + " Order Number : " + DoubleToStr(OrderTicket(), 0) + " Profit : $ " + DoubleToStr(OrderProfit(), 2)); } } } } //====================================================================================================================================================== if (Hidden_SL == TRUE) { for (int NN = 0; NN < OrdersTotal(); NN++) { OrderSelect(NN, SELECT_BY_POS, MODE_TRADES); if (OrderType() == OP_BUY && (OrderMagicNumber() == Magic)) { if(OrderType()==OP_BUY && Bid<=Last_BUY_OpenPrice-(SLB*PointOfPair)) OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Blue); } if (OrderType() == OP_SELL && (OrderMagicNumber() == Magic)) { if(OrderType()==OP_SELL && Ask>=Last_SELL_OpenPrice+(SLB*PointOfPair)) OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,Red); } } } //====================================================================================================================================================== for (int t = 0; t < OrdersTotal(); t++) { OrderSelect(t, SELECT_BY_POS, MODE_TRADES); if (Hidden_TP && !Use_Fractal_TP_SL) { if (OrderType() == OP_BUY && OrderMagicNumber() == Magic) { if (Bid >= OrderOpenPrice() + (TP) * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Orange);}} if (OrderType() == OP_SELL && OrderMagicNumber() == Magic) { if (Ask <= OrderOpenPrice() - (TP) * PointOfPair) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Orange);}} } else if (Use_Fractal_TP_SL) { if (OrderType() == OP_BUY && OrderMagicNumber() == Magic && GetFractalBUY_TP()==1) { if (Bid>=(LastUpFractal-(F_TP*PointOfPair))) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Orange);}} if (OrderType() == OP_BUY && OrderMagicNumber() == Magic && GetFractalBUY_SL()==1) { if (Bid<=(LastDownFractal-(F_TP*2*PointOfPair))) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Orange);}} if (OrderType() == OP_SELL && OrderMagicNumber() == Magic && GetFractalSELL_TP()==1) { if (Ask<=(LastDownFractal+(F_TP*PointOfPair))) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Orange);}} if (OrderType() == OP_SELL && OrderMagicNumber() == Magic && GetFractalSELL_SL()==1) { if (Ask>=(LastUpFractal+(F_TP*2*PointOfPair))) { RefreshRates(); OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Orange);}} } } //====================================================================================================================================================== if (TradetimeA()==1) { if (Tradetime2()==1) Comment( "\n "+Expert_Name, "\n\n T R A D E S E S S I O N", "\n*=====================*", "\n Broker Time = ", Hour(), "\n Time Star Trading = ", OpenHour, "\n Time Stop Trading = ", CloseHour, "\n*=====================*", "\n Fractal Envelope = "+FractalEnvelope+" pips", "\n MidFractal = "+DoubleToStr(midFractal,Digits), "\n ATR(4)_M5 = "+CurrentATR+" pips", "\n*=====================*", "\n L O T S = " + DoubleToStr(GetLots(),2), "\n B A L A N C E = " + DoubleToStr(AccountBalance(),2), "\n E Q U I T Y = " + DoubleToStr(AccountEquity(),2), "\n*=====================*", //saya salut dengan teman-teman coder... //saya hanya orang pelosok yang tidak berpeluang trading karena keterbatasan dana //karena itu... saya memutuskan untuk mengoprek/membuat EA dan indi untuk digunakan para trader... //mohon kiranya jika anda menggunakan script ini... jangan menghapus kalimat dibawah... salam coder... semoga sukses... "\n\n\n "+Expert_Name+" EA is free and still on developing", "\n You can discuss to me how to applying it or to develop this ea", "\n To support my creativity please donate for me with all yours heart...", "\n\n For further information please contact me on : abdulrahman_maros@yahoo.com", "\n to make a donation : Abdul Rahman ==> BCA : 7990026640 / LR : U7067895" ); //====================================================================================================================================================== else { if(TOTAL_OpenPosition<MaxTrades) { if(BarCount != Bars) { TradePerBar = 0; BarCount = Bars; } RefreshRates(); //====================================================================================================================================================== //====================================================================================================================================================== //====================================================================================================================================================== if (next_buy==true && FractalIsInsideEnvelope && TradePerBar<MaxTradePerBar && BUY_OpenPosition<1 && MA_M1<=-0.12 && GetSignal(OP_BUY)==1) //&& Bid<=midFractal-(TP/2*PointOfPair) { // && (CCI_M5<=-150) && (CCI_M15<=-150) if(AccountFreeMarginCheck(Symbol(),OP_BUY,GetLots())<=0 || GetLastError()==134) {Print("We have no money.Reduce your Lots! Free Margin = ", AccountFreeMargin());} else { sl=(LastDownFractal-(F_SL*PointOfPair)); tp=(LastUpFractal-(F_TP*PointOfPair)); if (Use_Fractal_TP_SL && GetFractalBUY_SL()==1 && GetFractalBUY_TP()==1) Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*2,LotsDigit),Ask,Slippage, sl,tp,"Your_Lucky"+Symbol(),Magic,0,Blue); else if(!Use_Fractal_TP_SL && Hidden_SL==true && Hidden_TP==true) Ticket = OrderSend(Symbol(),OP_BUY,NormalizeDouble(GetLots()*2,LotsDigit),Ask,Slippage, 0, 0,"Your_Lucky"+Symbol(),Magic,0,Blue); else if(!Use_Fractal_TP_SL && Hidden_SL==false && Hidden_TP==true) Ticket = OrderSend(Symbol(),OP_BUY,NormalizeDouble(GetLots()*2,LotsDigit),Ask,Slippage, Ask-SLB * PointOfPair, 0,"Your_Lucky"+Symbol(),Magic,0,Blue); else if(!Use_Fractal_TP_SL && Hidden_SL==true && Hidden_TP==false) Ticket = OrderSend(Symbol(),OP_BUY,NormalizeDouble(GetLots()*2,LotsDigit),Ask,Slippage, 0, Ask+TP*PointOfPair,"Your_Lucky"+Symbol(),Magic,0,Blue); else Ticket = OrderSend(Symbol(),OP_BUY,NormalizeDouble(GetLots()*2,LotsDigit),Ask,Slippage, Ask-SLB * PointOfPair, Ask+TP*PointOfPair,"Your_Lucky"+Symbol(),Magic,0,Blue); if (Ticket > 0) TradePerBar++; } next_sell = true; next_buy = false; } //====================================================================================================================================================== if (next_buy==true && FractalIsInsideEnvelope && TradePerBar<MaxTradePerBar && BUY_OpenPosition<MaxTradePerPosition && Last_BUY_OpenPrice-Bid>=TP*0.75*PointOfPair && MA_M1<=-0.12 && GetSignal(OP_BUY)==1) { // && (CCI_M5<=-150) && (CCI_M15<=-150) if(AccountFreeMarginCheck(Symbol(),OP_BUY,GetLots())<=0 || GetLastError()==134) {Print("We have no money.Reduce your Lots! Free Margin = ", AccountFreeMargin());} else { sl=(LastDownFractal-(F_SL*PointOfPair)); tp=(LastUpFractal-(F_TP*PointOfPair)); if (Use_Fractal_TP_SL && GetFractalBUY_SL()==1 && GetFractalBUY_TP()==1) Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*0.75,LotsDigit),Ask,Slippage, sl,tp,"Your_Lucky"+Symbol(),Magic,0,Blue); else if(!Use_Fractal_TP_SL && Hidden_SL==true && Hidden_TP==true) Ticket = OrderSend(Symbol(),OP_BUY,NormalizeDouble(GetLots()*0.75,LotsDigit),Ask,Slippage, 0, 0,"Your_Lucky"+Symbol(),Magic,0,Blue); else if(!Use_Fractal_TP_SL && Hidden_SL==false && Hidden_TP==true) Ticket = OrderSend(Symbol(),OP_BUY,NormalizeDouble(GetLots()*0.75,LotsDigit),Ask,Slippage, Ask-SLB * PointOfPair, 0,"Your_Lucky"+Symbol(),Magic,0,Blue); else if(!Use_Fractal_TP_SL && Hidden_SL==true && Hidden_TP==false) Ticket = OrderSend(Symbol(),OP_BUY,NormalizeDouble(GetLots()*0.75,LotsDigit),Ask,Slippage, 0, Ask+TP*PointOfPair,"Your_Lucky"+Symbol(),Magic,0,Blue); else Ticket = OrderSend(Symbol(),OP_BUY,NormalizeDouble(GetLots()*0.75,LotsDigit),Ask,Slippage, Ask-SLB * PointOfPair, Ask+TP*PointOfPair,"Your_Lucky"+Symbol(),Magic,0,Blue); if (Ticket > 0) TradePerBar++; } next_sell = true; next_buy = false; } //====================================================================================================================================================== if (next_sell==true && FractalIsInsideEnvelope && TradePerBar<MaxTradePerBar && SELL_OpenPosition<1 && MA_M1>=0.12 && GetSignal(OP_SELL)==1) // && Ask>=midFractal+(TP/2*PointOfPair) { // && (CCI_M5>=150) && (CCI_M15>=150) if(AccountFreeMarginCheck(Symbol(),OP_SELL,GetLots())<=0 || GetLastError()==134) {Print("We have no money.Reduce your Lots! Free Margin = ", AccountFreeMargin());} else { sl=(LastUpFractal+(F_SL*PointOfPair)); tp=(LastDownFractal+(F_TP*PointOfPair)); if (Use_Fractal_TP_SL && GetFractalSELL_SL()==1 && GetFractalSELL_TP()==1) Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*2,LotsDigit),Bid,Slippage, sl,tp,"Your_Lucky"+Symbol(),Magic,0,Blue); else if(!Use_Fractal_TP_SL && Hidden_SL==true && Hidden_TP==true) Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*2,LotsDigit),Bid,Slippage,0,0,"Your_Lucky"+Symbol(),Magic,0,Red); else if(!Use_Fractal_TP_SL && Hidden_SL==false && Hidden_TP==true) Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*2,LotsDigit),Bid,Slippage,Bid+SLB*PointOfPair,0,"Your_Lucky"+Symbol(),Magic,0,Red); else if(!Use_Fractal_TP_SL && Hidden_SL==true && Hidden_TP==false) Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*2,LotsDigit),Bid,Slippage,0,Bid-TP*PointOfPair,"Your_Lucky"+Symbol(),Magic,0,Red); else Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*2,LotsDigit),Bid,Slippage,Bid+SLB*PointOfPair,Bid-TP*PointOfPair,"Your_Lucky"+Symbol(),Magic,0,Red); if (Ticket > 0) TradePerBar++; } next_buy = true; next_sell = false; } //====================================================================================================================================================== if (next_sell==true && FractalIsInsideEnvelope && TradePerBar<MaxTradePerBar && SELL_OpenPosition<MaxTradePerPosition && Ask-Last_SELL_OpenPrice>=TP*0.75*PointOfPair && MA_M1>=0.12 && GetSignal(OP_SELL)==1) { // && (CCI_M5>=150) && (CCI_M15>=150) if(AccountFreeMarginCheck(Symbol(),OP_SELL,GetLots())<=0 || GetLastError()==134) {Print("We have no money.Reduce your Lots! Free Margin = ", AccountFreeMargin());} else { sl=(LastUpFractal+(F_SL*PointOfPair)); tp=(LastDownFractal+(F_TP*PointOfPair)); if (Use_Fractal_TP_SL && GetFractalSELL_SL()==1 && GetFractalSELL_TP()==1) Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*0.75,LotsDigit),Bid,Slippage, sl,tp,"Your_Lucky"+Symbol(),Magic,0,Blue); else if(!Use_Fractal_TP_SL && Hidden_SL==true && Hidden_TP==true) Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*0.75,LotsDigit),Bid,Slippage,0,0,"Your_Lucky"+Symbol(),Magic,0,Red); else if(!Use_Fractal_TP_SL && Hidden_SL==false && Hidden_TP==true) Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*0.75,LotsDigit),Bid,Slippage,Bid+SLB*PointOfPair,0,"Your_Lucky"+Symbol(),Magic,0,Red); else if(!Use_Fractal_TP_SL && Hidden_SL==true && Hidden_TP==false) Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*0.75,LotsDigit),Bid,Slippage,0,Bid-TP*PointOfPair,"Your_Lucky"+Symbol(),Magic,0,Red); else Ticket = OrderSend(Symbol(),OP_SELL,NormalizeDouble(GetLots()*0.75,LotsDigit),Bid,Slippage,Bid+SLB*PointOfPair,Bid-TP*PointOfPair,"Your_Lucky"+Symbol(),Magic,0,Red); if (Ticket > 0) TradePerBar++; } next_buy = true; next_sell = false; } //====================================================================================================================================================== if ((MA_M1<0.1 && MA_M1>-0.1)) { next_sell = true; next_buy = true; } } //====================================================================================================================================================== } } //====================================================================================================================================================== else Comment( "\n "+Expert_Name, "\n\n O u t O f S E S S I O N", "\n*=====================*", "\n Broker Time = ", Hour(), "\n Time Star Trading = ", OpenHour, "\n Time Stop Trading = ", CloseHour, "\n*=====================*", "\n Fractal Envelope = "+FractalEnvelope+" pips", "\n MidFractal = "+DoubleToStr(midFractal,Digits), "\n ATR(4)_M5 = "+CurrentATR+" pips", "\n*=====================*", "\n L O T S = " + DoubleToStr(GetLots(),2), "\n B A L A N C E = " + DoubleToStr(AccountBalance(),2), "\n E Q U I T Y = " + DoubleToStr(AccountEquity(),2), "\n*=====================*", //saya salut dengan teman-teman coder... //saya hanya orang pelosok yang tidak berpeluang trading karena keterbatasan dana //karena itu... saya memutuskan untuk mengoprek/membuat EA dan indi untuk digunakan para trader... //mohon kiranya jika anda menggunakan script ini... jangan menghapus kalimat dibawah... salam coder... semoga sukses... "\n\n\n "+Expert_Name+" EA is free and still on developing", "\n You can discuss to me how to applying it or to develop this ea", "\n To support my creativity please donate for me with all yours heart...", "\n\n For further information please contact me on : abdulrahman_maros@yahoo.com", "\n to make a donation : Abdul Rahman ==> BCA : 7990026640 / LR : U7067895" ); CloseAll(); //====================================================================================================================================================== return(0); } //====================================================================================================================================================== int GetSignal(int OP) { double EvA_M1 = iEnvelopes(Symbol(),PERIOD_M1,15,MODE_LWMA,0,PRICE_WEIGHTED,0.03,MODE_UPPER,0); double EvB_M1 = iEnvelopes(Symbol(),PERIOD_M1,15,MODE_LWMA,0,PRICE_WEIGHTED,0.03,MODE_LOWER,0); double EvA2_M1 = iEnvelopes(Symbol(),PERIOD_M1,60,MODE_LWMA,0,PRICE_WEIGHTED,0.10,MODE_UPPER,0); double EvB2_M1 = iEnvelopes(Symbol(),PERIOD_M1,60,MODE_LWMA,0,PRICE_WEIGHTED,0.10,MODE_LOWER,0); double EvA_M5 = iEnvelopes(Symbol(),PERIOD_M5,15,MODE_LWMA,0,PRICE_WEIGHTED,0.05,MODE_UPPER,0); double EvB_M5 = iEnvelopes(Symbol(),PERIOD_M5,15,MODE_LWMA,0,PRICE_WEIGHTED,0.05,MODE_LOWER,0); double EvA2_M5 = iEnvelopes(Symbol(),PERIOD_M5,90,MODE_LWMA,0,PRICE_WEIGHTED,0.15,MODE_UPPER,0); double EvB2_M5 = iEnvelopes(Symbol(),PERIOD_M5,90,MODE_LWMA,0,PRICE_WEIGHTED,0.15,MODE_LOWER,0); double EvA_M15 = iEnvelopes(Symbol(),PERIOD_M15,15,MODE_LWMA,0,PRICE_WEIGHTED,0.15,MODE_UPPER,0); double EvB_M15 = iEnvelopes(Symbol(),PERIOD_M15,15,MODE_LWMA,0,PRICE_WEIGHTED,0.15,MODE_LOWER,0); double EvA2_M15 = iEnvelopes(Symbol(),PERIOD_M15,60,MODE_LWMA,0,PRICE_WEIGHTED,0.25,MODE_UPPER,0); double EvB2_M15 = iEnvelopes(Symbol(),PERIOD_M15,60,MODE_LWMA,0,PRICE_WEIGHTED,0.25,MODE_LOWER,0); double MA1_M5 =iMA(Symbol(),PERIOD_M5,IMA_PERIOD,0,MODE_LWMA,PRICE_WEIGHTED,0); double MA1_M15 =iMA(Symbol(),PERIOD_M15,IMA_PERIOD,0,MODE_LWMA,PRICE_WEIGHTED,0); double MAHigh_M5 =iMA(Symbol(),PERIOD_M5,IMA_PERIOD,0,MODE_LWMA,PRICE_HIGH,0); double MALow_M5 =iMA(Symbol(),PERIOD_M5,IMA_PERIOD,0,MODE_LWMA,PRICE_LOW,0); double MAHigh_M1 =iMA(Symbol(),PERIOD_M1,IMA_PERIOD,0,MODE_LWMA,PRICE_HIGH,0); double MALow_M1 =iMA(Symbol(),PERIOD_M1,IMA_PERIOD,0,MODE_LWMA,PRICE_LOW,0); double adx_A_M5 = iADX(Symbol(),PERIOD_M5,ADX_Period,PRICE_CLOSE,0,0); double adx_B_M5 = iADX(Symbol(),PERIOD_M5,ADX_Period,PRICE_CLOSE,1,0); double adx_S_M5 = iADX(Symbol(),PERIOD_M5,ADX_Period,PRICE_CLOSE,2,0); int signal=0; if (OP==OP_BUY) { if(MALow_M1<=EvB_M1+(TP/2*PointOfPair) && EvB_M1>=EvB2_M1 && MA1_M5>EvB2_M5 && //EvB_M15>EvB2_M15 && //(adx_B_M5<ADX_Level && adx_S_M5<ADX_Level) && (Ask+(PointOfPair*TP/2)<=iMA(Symbol(),PERIOD_M5,IMA_PERIOD,0,MODE_SMA,PRICE_OPEN,1) || Ask+(PointOfPair*TP/2)<=iMA(Symbol(),PERIOD_M15,IMA_PERIOD,0,MODE_SMA,PRICE_OPEN,1))) signal=1; } else if (OP==OP_SELL) { if(MAHigh_M1>=EvA_M1-(TP/2*PointOfPair) && EvA_M1<=EvA2_M1 && MA1_M5<EvA2_M5 && //EvA_M15<EvA2_M15 && //(adx_B_M5<ADX_Level && adx_S_M5<ADX_Level) && (Bid-(PointOfPair*TP/2)>=iMA(Symbol(),PERIOD_M5,IMA_PERIOD,0,MODE_SMA,PRICE_OPEN,1) || Bid-(PointOfPair*TP/2)>=iMA(Symbol(),PERIOD_M15,IMA_PERIOD,0,MODE_SMA,PRICE_OPEN,1))) signal=1; } return(signal); } //====================================================================================================================================================== void CloseAll() { for (int cnt = OrdersTotal()-1 ; cnt >= 0; cnt--) { OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES); if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderCloseTime()==0) { if (SecurProfit()==1 && Hidden_TP==true) { if(OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Blue); if(OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,Red); } else { if (TradetimeA() == 1) { if((OrderType()==OP_BUY) && (((OrderOpenPrice()-Ask)/PointOfPair) > SLB)) OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Blue); if((OrderType()==OP_SELL) && (((Bid-OrderOpenPrice())/PointOfPair) > SLB)) OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,Red); } else { if((OrderType()==OP_BUY) && (((OrderOpenPrice()-Ask)/PointOfPair) > SLA)) OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Blue); if((OrderType()==OP_SELL) && (((Bid-OrderOpenPrice())/PointOfPair) > SLA)) OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,Red); } } } } } //====================================================================================================================================================== void ForceCloseAll() { for (int cnt = OrdersTotal()-1 ; cnt >= 0; cnt--) { OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES); if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderCloseTime()==0) { if(OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Blue); if(OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,Red); } } } //====================================================================================================================================================== int TradetimeA() { int TradingTime=0; if (Hour() <= CloseHour || Hour() >= OpenHour) TradingTime=1; return(TradingTime); } //====================================================================================================================================================== int Tradetime2() { int TradingTime=0; if ((DayOfWeek() == 1 && Hour() <= OpenHour) || (DayOfWeek() == 5 && Hour() >= CloseHour)) TradingTime=1; return(TradingTime); } //====================================================================================================================================================== double GetLots() { double lots,MD,RM,FMM,MinLots,LotSize; int lotsdigit; LotSize = MarketInfo(Symbol(), MODE_LOTSIZE); MD = NormalizeDouble(MarketInfo(Symbol(), MODE_LOTSTEP), 2); RM = NormalizeDouble(MarketInfo(Symbol(), MODE_MARGINREQUIRED), 4); FMM = (RM+5)*100; if(LotsDigit==0) { if (MD==0.01) lotsdigit=2; else if (MD==0.10) lotsdigit=1; else lotsdigit=0; LotsDigit=lotsdigit; } //if (MM==true) lots = NormalizeDouble(AccountFreeMargin()/(FMM/Risk)-0.05,LotsDigit); if (LotsOptimized==true) lots = NormalizeDouble((AccountFreeMargin()*Risk/LotSize)/MaxTrades,lotsdigit); else lots=Lots; MinLots=NormalizeDouble(MarketInfo(Symbol(),MODE_MINLOT),2); if (LotsDigit == 2) MinLots = 0.01; if (LotsDigit == 1) MinLots = 0.1; if (LotsDigit == 0) MinLots = 1; if (lots < MinLots) lots = MinLots; if (lots > MaxLots) lots = MaxLots; return (lots); } //====================================================================================================================================================== double TickValue() { double tv; tv = NormalizeDouble(MarketInfo(Symbol(), MODE_TICKVALUE), Digits); return(tv); } //====================================================================================================================================================== int SecurProfit() { int sp=0; if (OrderProfit()>(TickValue()*GetLots()*TP)) sp=1; return(sp); } //====================================================================================================================================================== int GetFractalSELL_SL() { int sp=0; if ((Bid<=LastUpFractal-(140*PointOfPair)) && (Bid+(SLB*PointOfPair)>=LastUpFractal)) sp=1; return(sp); } //====================================================================================================================================================== int GetFractalSELL_TP() { int sp=0; if (Bid>LastDownFractal+(140*PointOfPair)) sp=1; return(sp); } //====================================================================================================================================================== int GetFractalBUY_SL() { int sp=0; if ((Ask>=LastDownFractal+(140*PointOfPair)) && (Ask-(SLB*PointOfPair)<=LastDownFractal)) sp=1; return(sp); } //====================================================================================================================================================== int GetFractalBUY_TP() { int sp=0; if (Ask<LastUpFractal-(140*PointOfPair)) sp=1; return(sp); } //====================================================================================================================================================== //======================================================================================================================================================
Привет всем , у меня такой вопрос к знатокам тестера стратегий, уже несколько советников пытаюсь протестировать в тестере на истории, почему-то все дают убыток, либо вообще ничего, поигрался таймфреймами - не помогло, да и вот с этим советником тоже не пляшет.....я и думаю может это терминал подкручен???? у меня он от мастерфорекс , так как там и реал открыт.......вообщем не понимаю в чём тут дело, думаю не из-за того, что не правильно тестю, т.к. в тестере мало есть шансов промахнуться....прошу о помощи......заранее спасибо.... С уважением
Привет всем!
не знаю как у Вас ну у меня он сливает под ноль всё:(
мож у Вас спреды другие...
Вы здесь » ROBOTRADING - Форум по автоматизированной и ручной торговле на финансовых рынках. » Эксперты » Пипсовщик Your_Lucky_EURGBP. Супер крутой и супер новый.