|פלפרוייקט שיתופי לחברי הפורום אוטומט קירקוף

bazforex

New member
|פלפרוייקט שיתופי לחברי הפורום אוטומט קירקוף

יש להעתיק את הקובץ ליפתוח MQ4 ליפתוח אוטומט חדש לנקות את התוכן ולהדביק את הקובץ הזה אוטומט זה צריך כיונון האוטומט בנוי על CCI לקירקוף יש אפשרות לשנות את הפרמטרים גודל עיסקה כמות העיסקאות שעות פתיחה וסגירה וגם אפשרות לשנות תפרמטרים שלCCI עובד על כל הצמדים החל מיגרף דקה!!! אשמח שתשרשרו אשכול זה ומקווה יחד ליצור אוטומט מקרקף בהצלחה
//+------------------------------------------------------------------+ //| m_1.mq4 | //| Copyright © 2010, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "ryaz" #property link "outta@here" #define EA "Scalpel" #define VER "1_01" extern double Lots = -5; //if Lots are negative means the percent of free margin used extern int TakeProfit =7; extern int StopLoss = 200; extern int TrailingStop =0; extern int cciPeriod = 14; extern double cciLimit = 75; extern int MaxPos=1; //open positions allowed in one dir. extern int Interval=0;//Minutes before adding a position (0=not used) extern int Reduce=600;//Minutes before reducing TP by one pip (0=not used) extern int Live=0;//Minutes before closing an order regardless profit (0=not used) extern int Volatility=100;//volatility bars (positive>directional or negative>non dir.) extern int Threshold=1;//pip threshold for volatility extern int FridayClose=22;//At what time to close all orders on Friday (0=not used) extern int slippage = 3; extern double spreadlimit = 5.5; extern int magic = 4665441; double high4, high1, high30, low4, low1, low30, high4s, high1s, high30s, low4s, low1s, low30s; double cci, volu, vold, vol0u, vol1u=1, vol0d, vol1d=1, min, max, lNorm, thresh; int tim=0, timm=0, tim30=0, tim1=0, tim4=0, lDigits, dig, pip; bool ccib, ccis; int init() { min=MarketInfo(Symbol(),MODE_MINLOT); max=MarketInfo(Symbol(),MODE_MAXLOT); lNorm=MarketInfo(Symbol(),MODE_LOTSTEP); if (lNorm==0.1) lDigits=1; else if (lNorm==0.01) lDigits=2; else if (lNorm==0.001) lDigits=3; else lDigits=0; lNorm=-MarketInfo(Symbol(),MODE_MARGINREQUIRED)*AccountLeverage()/100; pip=1; while (Lots<=-1) Lots/=100; dig=Digits; if (dig==3 || dig==5) { TakeProfit*=7; StopLoss*=200; TrailingStop*=0; slippage*=10; pip=10; dig--; } Interval*=60; thresh=pip*Point*MathAbs(Threshold); spreadlimit*=pip*Point; } double UseLots() { if (Lots>0) return(Lots); double lots=MathMin(NormalizeDouble(AccountFreeMargin()*Lots/lNorm,lDigits),max); if (lots<min) return(0); return(lots); } void start() { int i,buys=0,sells=0,life=0; double lots, h, l; bool close; if(Bars<cciPeriod || !IsTradeAllowed()) return; for(i=OrdersTotal()-1;i>=0;i--) { if (!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) continue; if (OrderMagicNumber()!=magic) continue; if (OrderSymbol()!=Symbol()) continue; life=(TimeCurrent()-OrderOpenTime())/60; if (Live>0) close=life>Live; else close=false; if (!close && FridayClose>0) close=DayOfWeek()==5 && Hour()>FridayClose; if (OrderType()==OP_BUY) { if (!close && Reduce>0) close=Bid>OrderTakeProfit()-pip*(life/Reduce)*Point; if (close) { close=OrderClose(OrderTicket(),OrderLots(),Bid,slippage,Aqua); RefreshRates(); if (close) {life=0;continue;} } buys++; if (TrailingStop>0) if (Bid-OrderOpenPrice() > Point*TrailingStop) if (NormalizeDouble(OrderStopLoss() - Bid+Point*TrailingStop,dig)<0) OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(Bid-Point*TrailingStop,Digits), OrderTakeProfit(), 0, Blue); } else { if (!close && Reduce>0) close=Ask<OrderTakeProfit()+pip*(life/Reduce)*Point; if (close) { close=OrderClose(OrderTicket(),OrderLots(),Ask,slippage,Pink); RefreshRates(); if (close) {life=0;continue;} } sells++; if (TrailingStop>0) if (OrderOpenPrice()-Ask > Point * TrailingStop) if (OrderStopLoss()==0 || NormalizeDouble(OrderStopLoss()- Ask-Point*TrailingStop,dig)>0) OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(Ask+Point*TrailingStop,Digits), OrderTakeProfit(), 0, Red); } } if (MathAbs(buys-sells)>=MaxPos) return; if (DayOfWeek()==5) return; if (Interval>0 && life>Interval) return; if (spreadlimit>0 && Ask-Bid>spreadlimit) return; if (tim!=Time[0]) { cci=iCCI(0,0,cciPeriod,PRICE_MEDIAN,1); if (cciLimit>0) { &nbs
 

bazforex

New member
אהלן גבר

לא מחייב סטופ גדול החוכמה עים סטופ ראלי את הנתונים אפשר לשנות תמיד!!!
 

bazforex

New member
יש לסדר את הקוים במיסגרת

הקוים ברחו מיתחת לפלוס במיסגרת הקובץ יש לסדר 3 קוים
 

bazforex

New member
למי שלא מיסתדר

ישלח אלי מייל בפרטי אשלח את הקובץ האורגנל
 
למעלה