صفحة 2 من 5 الأولىالأولى 12345 الأخيرةالأخيرة
النتائج 16 إلى 30 من 66
  1. #16
    الصورة الرمزية MR.dollar
    MR.dollar غير متواجد حالياً مشرف المتداول العربي
    تاريخ التسجيل
    Jun 2009
    الإقامة
    مصر
    المشاركات
    13,851

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة السمحان مشاهدة المشاركة
    استاذ اسامه
    عدلت على الكود والان يعمل بشكل جيد
    هل التعديل صحيح
    كان

    كود PHP:
    if(type>OP_SELL && order_OP!=Order_Price
    اصبح

    كود PHP:
    if(type>OP_SELL && (order_OP!=Order_Price || order_SL!=Order_SL || order_TP!=Order_TP)) 

    كود السلاف كامل بعد التعديل

    كود PHP:
    //+------------------------------------------------------------------+
    //|                                                                  |
    //|                                                                  |
    //|                                      www.arabictrader.com/vb     |
    //|                                                                  |
    //|                                          [email protected]   |
    //+------------------------------------------------------------------+
     
    #property copyright "MR.dollarEA"
    #property link      "[email protected]"
     
     
    #import "kernel32.dll"
    int CreateFileW(string Filename,uint AccessMode,int ShareMode,int PassAsZero,int CreationMode,int FlagsAndAttributes,int AlsoPassAsZero);
    int ReadFile(int FileHandle,uchar  &Buffer[],int BufferLength,int  &BytesRead[],int PassAsZero);
    int SetFilePointer(int FileHandle,int Distance,int PassAsZero,int FromPosition);
    int GetFileSize(int FileHandle,int PassAsZero);
    int CloseHandle(int FileHandle);
    #import
     
    #define GENERIC_READ            0x80000000
    #define WIN32_FILE_SHARE_READ   1
    #define WIN32_FILE_SHARE_WRITE  2
    #define OPEN_EXISTING           3
    #define SEEK_FILE_BEGIN         0
    #define SEEK_FILE_CURRENT       1
    #define INVALID_HANDLE_VALUE    -1
    #define READ_BUFFER_SIZE      1024
     
     
    input bool ECN_Broker=false;
    input string Master_Path="";
    input int MaxPipsDifference=10;
     
    input string info1="Lot Settings ";
    input bool AutoLotPercent=true;
    input double MinimumLot=0.1;
    input double MultiLotNumber=1;
    input bool CustomLot=false;
    input double Lots=0.1;
    input bool MoneyManagment=false;
    input double Risk=2.0;
    input int OrderExpirationMinutes=2;
    input string info2=" Order Managment Settings ";
    input bool CopyCloseOrder=true;
    input bool CopyOrdersModifications=true;
    input bool CopyTakeProfit=true;
     
    input int ManualTakeProfit=0;
    input bool CopyStopLoss=true;
    input int ManualStopLoss=0;
    input int MagicNumber=11111;
    input bool Show_Panel=true;
     
    int Lot_Decimal=1;
    int P;
    string OrdersInfo[];
    datetime StartTime;
    string prefix;
    string status="Waiting";
    int LastReadedLine;
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    int OnInit()
      {
       if(
    StringLen(Symbol())>6)prefix=StringSubstr(Symbol(),6,0);
       
    StartTime=TimeCurrent();
       if(
    Digits==5||Digits==3)P=10;
       else 
    P=1;
       if(
    MarketInfo(Symbol(),MODE_MINLOT)<0.1)Lot_Decimal=2;
     
       if(
    Show_Panel)
         {
     
          
    CreatePanel("PPanel_info_Rec1",OBJ_RECTANGLE_LABEL,"",5,20,220,210,Black,Red,Blue,8);
          
    DrawObjects();
         }
       
    LastReadedLine=0;
     
       return (
    INIT_SUCCEEDED);
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    void OnDeinit(const int reason)
      {
       
    Comment("");
       for(
    int i=ObjectsTotal()-1;i>=0;i--)
         {
          
    string namee=ObjectName(i);
          if(
    StringFind(namee,"PPanel",0)>=0)ObjectDelete(namee);
         }
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    int OrderIsOpened(int ticket)
      {
       
    int i;
       for(
    i=OrdersTotal()-1;i>=0;i--)
         {
          
    bool select=OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
          if(
    OrderComment()==IntegerToString(ticket))return(OrderTicket());
         }
       for(
    i=OrdersHistoryTotal()-1;i>=0;i--)
         {
          
    select=OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
          if(
    OrderComment()==IntegerToString(ticket))return(OrderTicket());
         }
     
       return(-
    1);
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
     
    void OnTick()
      {
     
       if(!
    IsDllsAllowed())
         {
          
    Alert("Make Sure DLL Import is Allowed");
          return;
         }
       if(
    Master_Path=="")
         {
          
    Alert("Make Sure you set Correct Master Path");
          
    status="Error";
          return;
         }
       
    double TP,SL;
     
       while(
    IsStopped()==false)
         {
          
    status="Connected";
          
    //Comment("Server Time : "+);
     
          
    Sleep(300);
          
    RefreshRates();
     
          
    int handlee=OpenExistingFileForReading(Master_Path+"\\MQL4\\Files\\CopierMaster.txt",true,true);
          if(
    IsValidFileHandle(handlee))
            {
             
    int NewSize=0;
             
    ArrayResize(OrdersInfo,NewSize);
             while(!
    IsFileAtEnd(handlee))
               {
                
    string line=ReadLineFromFile(handlee,"\n");
                
    NewSize++;
                
    ArrayResize(OrdersInfo,NewSize);
                
    OrdersInfo[NewSize-1]=line;
                
    // Alert(line);
               
    }
             
    CloseFile(handlee);
            }
          else
            {
             
    status="Error";
             
    Alert("Error Open File");
            }
     
          for(
    int i=LastReadedLine;i<NewSize;i++)
            {
             
    LastReadedLine++;
             
    int PreviousCounted=0;
             
    //int index;
             
    int Order_Ticket,Order_Type,Action_Type;
             
    string Order_Symbol="";
             
    double Order_Price,Order_SL,Order_TP,Order_Lots,Order_Time,Order_Time_GMT,Balance;
     
             
    Get_Data(OrdersInfo[i]);
     
             
    Action_Type=StringToInteger(Order_Data[10]);
     
             
    int check_Order_Opened=OrderIsOpened(StringToInteger(Order_Data[0]));
     
             if(
    check_Order_Opened!=-&& Action_Type==0)continue;// check if the order is opened then go to next order
     
             
    Order_Ticket=StringToInteger(Order_Data[0]);
             
    Order_Symbol=Order_Data[1]+prefix;
             
    Order_Type=StringToInteger(Order_Data[2]);
             
    Order_Lots=StrToDouble(Order_Data[3]);
             
    Order_Price=StrToDouble(Order_Data[4]);
             
    Order_SL=StrToDouble(Order_Data[5]);
             
    Order_TP=StrToDouble(Order_Data[6]);
             
    Order_Time=StrToDouble(Order_Data[7]);
             
    Order_Time_GMT=StrToDouble(Order_Data[8]);
             
    Balance=StrToDouble(Order_Data[9]);
     
           
             if(
    Action_Type==0)
               {
     
                if(
    Order_Ticket!=&& MathAbs(Order_Time_GMT-TimeGMT())<=OrderExpirationMinutes*60)
                  {
     
                   
    status="Working";
                   
    RefreshRates();
     
                   
    double point=MarketInfo(Order_Symbol,MODE_POINT)*P;
                   if(
    Order_Type==&& MathAbs(Order_Price-MarketInfo(Order_Symbol,MODE_ASK))<=MaxPipsDifference*point)
                     {
                      
    Order_Price=MarketInfo(Order_Symbol,MODE_ASK);
                     }
                   if(
    Order_Type==&& MathAbs(Order_Price-MarketInfo(Order_Symbol,MODE_BID))<=MaxPipsDifference*point)
                     {
                      
    Order_Price=MarketInfo(Order_Symbol,MODE_BID);
                     }
                   if(
    CustomLot)Order_Lots=Lots;
                   else if(
    MoneyManagment)Order_Lots=LotManage();
                   else if(
    AutoLotPercent)Order_Lots=MathMax(CalculateLotPercent(Balance,Order_Lots),MinimumLot)*MultiLotNumber;
     
                   if(
    CopyTakeProfit)
                     {
                      
    TP=Order_TP;
                     }
                   else
                     {
                      if(
    ManualTakeProfit==0){TP=0;}else {TP=Order_Price+ManualTakeProfit*GetTP(Order_Type)*point;}
                     }
                   if(
    CopyStopLoss)
                     {
                      
    SL=Order_SL;
                     }
                   else
                     {
                      if(
    ManualStopLoss==0){SL=0;}else {SL=Order_Price+ManualStopLoss*GetSL(Order_Type)*point;}
                     }
                   
    double ECN_SL,ECN_TP;
                   if(
    ECN_Broker){ECN_SL=SL;ECN_TP=TP;SL=0;TP=0;}
                   
    int ticket=OrderSend(Order_Symbol,Order_Type,Order_Lots,Order_Price,3*P,SL,TP,IntegerToString(Order_Ticket),MagicNumber,0,White);
                   if(
    ECN_Broker && SL!=&& TP!=&& ticket>0)
                     {
                      
    bool modify=OrderModify(ticket,Order_Price,ECN_SL,ECN_TP,0);
                     }
                   if(
    ticket<0)Print("Error Open Order : "+GetLastError());
                  }
               }
             else if(
    Action_Type==&& check_Order_Opened>0)
               {
     
                if(
    OrderSelect(check_Order_Opened,SELECT_BY_TICKET,MODE_TRADES))
                  {
     
                   
    int type=OrderType();
                   
    double order_OP=OrderOpenPrice();
                   
    double order_SL=OrderStopLoss();
                   
    double order_TP=OrderTakeProfit();
                   
    double order_Exp=OrderExpiration();
     
                   if(
    type>OP_SELL && (order_OP!=Order_Price || order_SL!=Order_SL || order_TP!=Order_TP))
                     {
                      
    modify=OrderModify(OrderTicket(),Order_Price,Order_SL,Order_TP,order_Exp);
                      if(!
    modify)Alert("Modify Order Error: "+GetLastError());
                     }
                   else if(
    type<=OP_SELL && (order_SL!=Order_SL || order_TP!=Order_TP))
                     {
                      
    modify=OrderModify(OrderTicket(),order_OP,Order_SL,Order_TP,0);
                      if(!
    modify)Alert("Modify Order Error: "+GetLastError());
                     }
                  }
               }
             else if(
    CopyCloseOrder && Action_Type==&& check_Order_Opened>0)
               {
                if(
    OrderSelect(check_Order_Opened,SELECT_BY_TICKET,MODE_TRADES))
                  {
     
                   
    string symbol=OrderSymbol();
     
                   
    RefreshRates();
                   
    double ask=MarketInfo(symbol,MODE_ASK);
                   
    double bid=MarketInfo(symbol,MODE_BID);
     
                   if(
    OrderType()==OP_BUY)bool action=OrderClose(OrderTicket(),OrderLots(),bid,3*P);
                   if(
    OrderType()==OP_SELL)action=OrderClose(OrderTicket(),OrderLots(),ask,3*P);
                   if(
    OrderType()>OP_SELL)action=OrderDelete(OrderTicket());
     
                   if(!
    action)Alert("Close Order Error: "+GetLastError());
     
                  }
               }
     
            }
     
          
    my_time=TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES|TIME_SECONDS);
          
    Comment("Server Time: "+TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES|TIME_SECONDS));
          if(
    Show_Panel)
             
    DrawObjects();
     
         }
     
      }
     
    string my_time;
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    string Order_Data[];
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    void Get_Data(string data)
      {
       
    ushort sep=StringGetCharacter("|",0);
       
    StringSplit(data,sep,Order_Data);
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    void CopyAutoClose(string &array[])
      {
       
    bool OrderIsClosed;
       
    bool action;
       for(
    int cnt=OrdersTotal()-1;cnt>=0;cnt--)
         {
          
    bool select=OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
          
    int Order_Ticket=OrderTicket();
          
    string Order_Comment=OrderComment();
          
    int type=OrderType();
          
    double lots=OrderLots();
          
    string symbol=OrderSymbol();
          if(
    OrderOpenTime()<StartTime)continue;
          if(
    OrderMagicNumber()==MagicNumber)
            {
             
    OrderIsClosed=true;
             for(
    int i=0;i<ArraySize(array);i++)
               {
                for(
    int j=0;j<StringLen(array[i]);j++)
                  {
                   if(
    StringSubstr(array[i],j,1)=="|")
                     {
                      
    string ticket=StringSubstr(array[i],0,j);
                      if(
    Order_Comment==ticket)OrderIsClosed=false;
                      break;
                     }
                  }
                if(!
    OrderIsClosed)break;
               }
             if(
    OrderIsClosed)
               {
                
    RefreshRates();
                
    double ask=MarketInfo(symbol,MODE_ASK);
                
    double bid=MarketInfo(symbol,MODE_BID);
     
                if(
    type==OP_BUY)action=OrderClose(Order_Ticket,lots,bid,3*P);
                if(
    type==OP_SELL)action=OrderClose(Order_Ticket,lots,ask,3*P);
                if(
    type>OP_SELL)action=OrderDelete(Order_Ticket);
               }
            }
         }
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    int GetTP(int type)
      {
       if(
    type==OP_BUY || type==OP_BUYLIMIT || type==OP_BUYSTOP)
         {
          return(
    1);
         }
       return(-
    1);
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    int GetSL(int type)
      {
       if(
    type==OP_BUY || type==OP_BUYLIMIT || type==OP_BUYSTOP)
         {
          return(-
    1);
         }
       return(
    1);
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    double LotManage()
      {
       
    double lot=MathCeil(AccountFreeMargin() *Risk/1000)/100;
       if(
    lot<MarketInfo(Symbol(),MODE_MINLOT))lot=MarketInfo(Symbol(),MODE_MINLOT);
       if(
    lot>MarketInfo(Symbol(),MODE_MAXLOT))lot=MarketInfo(Symbol(),MODE_MAXLOT);
       return (
    NormalizeDouble(lot,Lot_Decimal));
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    double CalculateLotPercent(double balance,double lots)
      {
       
    double myLot=(AccountBalance()/balance)*lots;
       return(
    myLot);
     
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    int OpenExistingFileForReading(string FileName,bool ShareForReading=true,bool ShareForWriting=false)
      {
       
    int ShareMode=0;
       if(
    ShareForReadingShareMode += WIN32_FILE_SHARE_READ;
       if(
    ShareForWritingShareMode += WIN32_FILE_SHARE_WRITE;
       return (
    CreateFileW(FileNameGENERIC_READShareMode0OPEN_EXISTING00));
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    string ReadLineFromFile(int FileHandle,string Terminator="\r\n")
      {
    // Holds the line which is eventually returned to the caller 
       
    string Line="";
     
    // Keep track of the file pointer before we start doing any reading 
       
    int InitialFilePointer=SetFilePointer(FileHandle,0,0,SEEK_FILE_CURRENT);
     
    // Keep reading from the file until we get the end of the line, or the end of the file 
       
    bool bContinueRead=true;
       while(
    bContinueRead)
         {
          
    // Receives the number of bytes read from the file. Note that MQL can only pass 
          // arrays as by-reference parameters to DLLs
          
    int BytesRead[1]={0};
     
          
    // Allocate a buffer
          
    uchar ReadBuffer[];
          
    ArrayResize(ReadBuffer,READ_BUFFER_SIZE+1);
     
          
    // Do a read of up to READ_BUFFER_SIZE bytes 
          
    ReadFile(FileHandle,ReadBuffer,READ_BUFFER_SIZE,BytesRead,0);
     
          
    // Check whether any data has been read...
          
    if(BytesRead[0]!=0)
            {
             
    // Add the new data to the line we've built so far
             
    Line=StringConcatenate(Line,CharArrayToString(ReadBuffer,0,BytesRead[0]));
     
             
    // Does the line now contain the specified terminator?
             
    int pFindTerminator StringFind(LineTerminator);
             if(
    pFindTerminator != -1)
               {
                
    // The line does contain the specified terminator. Remove it from the data we're 
                // going to pass back to the caller
                
    Line=StringSubstr(Line,0,pFindTerminator);
     
                
    // We've almost certainly read too much data - i.e. the latest 200 byte block 
                // intrudes into the next line. Need to adjust the file pointer to the start
                // of the next line. This must be the file pointer before we started reading, plus
                // the length of the line we've read, plus the length of the terminator 
                
    SetFilePointer(FileHandle,InitialFilePointer+StringLen(Line)+StringLen(Terminator),0,SEEK_FILE_BEGIN);
     
                
    // Stop reading 
                
    bContinueRead=false;
                  } else {
                
    // The line read so far does not yet contain the specified terminator 
                
    bContinueRead=true;
               }
     
               } else {
             
    // Either at the end of the file, or the file handle is not valid for reading 
             
    bContinueRead=false;
            }
         }
     
       return (
    Line);
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    double LastOrderInfo(string index)
      {
       for(
    int i=OrdersHistoryTotal()-1;i>=0;i--)
         {
          
    bool select=OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
          if(
    OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber)
            {
             if(
    index=="P")return(OrderProfit());
             if(
    index=="L")return(OrderLots());
            }
         }
       return(
    0);
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    bool IsFileAtEnd(int FileHandle)
      {
       
    int CurrentFilePointer=SetFilePointer(FileHandle,0,0,SEEK_FILE_CURRENT);
       return (
    CurrentFilePointer >= GetFileSize(FileHandle0));
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    bool IsValidFileHandle(int FileHandle)
      {
       return (
    FileHandle != INVALID_HANDLE_VALUE);
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    void CloseFile(int FileHandle)
      {
       
    CloseHandle(FileHandle);
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    int TotalOrders(int type)
      {
       
    int cnt=0;
       for(
    int i=0;i<OrdersTotal();i++)
         {
          if(
    OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
            {
             if(
    OrderType()==type && OrderMagicNumber()==MagicNumber)
               {
                
    cnt++;
               }
            }
         }
       return(
    cnt);
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    void DrawObjects()
      {
       
    int X_Shift=10,Y_Shift=20;
       
    int Added=25;
     
       
    RefreshRates();
       
    CreatePanel("PPanel_Info_S3",OBJ_EDIT,"Server Time: ",X_Shift,Added+Y_Shift,80,20,Black,White,Black,9,true,false,0,ALIGN_LEFT);
       
    CreatePanel("PPanel_Info_S4",OBJ_EDIT,my_time,100+X_Shift,Added+Y_Shift,110,20,Black,White,Red,8,true,false,0,ALIGN_CENTER);Added+=25;
     
       
    CreatePanel("PPanel_Info_S5",OBJ_EDIT,"Copier Status: ",X_Shift,Added+Y_Shift,90,20,Black,White,Black,9,true,false,0,ALIGN_LEFT);
       
    CreatePanel("PPanel_Info_S6",OBJ_EDIT,status,100+X_Shift,Added+Y_Shift,110,20,Black,White,Red,8,true,false,0,ALIGN_CENTER);Added+=25;
     
       
    CreatePanel("PPanel_Info_Balance1",OBJ_EDIT,"Balance",X_Shift,Added+Y_Shift,80,20,Black,White,Black,10,true,false,0,ALIGN_LEFT);
       
    CreatePanel("PPanel_Info_Balance2",OBJ_EDIT,DoubleToStr(AccountBalance(),2),100+X_Shift,Added+Y_Shift,110,20,Black,White,Red,9,true,false,0,ALIGN_CENTER);Added+=25;
     
       
    CreatePanel("PPanel_Info_B1",OBJ_EDIT,"Total Copied Buy :",X_Shift,Added+Y_Shift,100,20,Black,White,Black,8,true,false,0,ALIGN_LEFT);
       
    CreatePanel("PPanel_Info_B2",OBJ_EDIT,DoubleToStr(TotalOrders(OP_BUY),0),120+X_Shift,Added+Y_Shift,70,20,Black,White,Red,10,true,false,0,ALIGN_CENTER);Added+=25;
     
       
    CreatePanel("PPanel_Info_S1",OBJ_EDIT,"Total Copied Sell :",X_Shift,Added+Y_Shift,100,20,Black,White,Black,8,true,false,0,ALIGN_LEFT);
       
    CreatePanel("PPanel_Info_S2",OBJ_EDIT,DoubleToStr(TotalOrders(OP_SELL),0),120+X_Shift,Added+Y_Shift,70,20,Black,White,Red,10,true,false,0,ALIGN_CENTER);Added+=35;
     
      }
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    void CreatePanel(string name_,ENUM_OBJECT Type,string text,int XDistance,int YDistance,int Width,int Hight,
                     
    color BGColor_,color InfoColor,color boarderColor,int fontsize,bool readonly=false,bool Obj_Selectable=false,int Corner=0,ENUM_ALIGN_MODE Align=ALIGN_LEFT)
      {
     
       if(
    ObjectFind(0,name_)==-1)
         {
          
    ObjectCreate(0,name_,Type,0,0,0);
          
    ObjectSetInteger(0,name_,OBJPROP_XDISTANCE,XDistance);
          
    ObjectSetInteger(0,name_,OBJPROP_YDISTANCE,YDistance);
          
    ObjectSetInteger(0,name_,OBJPROP_XSIZE,Width);
          
    ObjectSetInteger(0,name_,OBJPROP_YSIZE,Hight);
          
    ObjectSetString(0,name_,OBJPROP_TEXT,text);
          
    ObjectSetString(0,name_,OBJPROP_FONT,"Arial Bold");
          
    ObjectSetInteger(0,name_,OBJPROP_FONTSIZE,fontsize);
          
    ObjectSetInteger(0,name_,OBJPROP_CORNER,Corner);
          
    ObjectSetInteger(0,name_,OBJPROP_COLOR,InfoColor);
          
    ObjectSetInteger(0,name_,OBJPROP_BORDER_TYPE,BORDER_FLAT);
          
    ObjectSetInteger(0,name_,OBJPROP_BORDER_COLOR,boarderColor);
          
    ObjectSetInteger(0,name_,OBJPROP_BGCOLOR,BGColor_);
          
    ObjectSetInteger(0,name_,OBJPROP_SELECTABLE,Obj_Selectable);
     
          if(
    Type==OBJ_EDIT)
            {
             
    ObjectSetInteger(0,name_,OBJPROP_ALIGN,Align);
             
    ObjectSetInteger(0,name_,OBJPROP_READONLY,readonly);
            }
         }
       else if(
    ObjectGet(name_,OBJPROP_TEXT)!=text || ObjectDescription(name_)!=text)
         {
          
    ObjectSetString(0,name_,OBJPROP_TEXT,text);
         }
      }
    //+------------------------------------------------------------------+ 
    جزاك الله خير صحيح 100%
    توقيع العضو
    بناء أنظمة تداول آلي ويدوي لفحص سوق العملات ودمجها مع التحليل الفني لإتخاذ القرارات

  2. #17
    الصورة الرمزية الباكري
    الباكري غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Jan 2018
    الإقامة
    السعودية
    المشاركات
    10

    افتراضي

    سؤال
    انا في الماستر فتحت sell
    بس الحساب الثاني فتح buy

    ليه

  3. #18
    الصورة الرمزية السمحان
    السمحان غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Oct 2015
    الإقامة
    السعودية
    المشاركات
    310

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة الباكري مشاهدة المشاركة
    سؤال
    انا في الماستر فتحت sell
    بس الحساب الثاني فتح buy

    ليه
    لانك مفعل خاضيه عكس الصفقات في الماستر
    ReverseTrades : تفعيل خيار عكس الصفقات
    خليها false

  4. #19
    الصورة الرمزية الباكري
    الباكري غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Jan 2018
    الإقامة
    السعودية
    المشاركات
    10

    افتراضي

    بارك الله فيك

  5. #20
    الصورة الرمزية الباكري
    الباكري غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Jan 2018
    الإقامة
    السعودية
    المشاركات
    10

    افتراضي

    الاكسبيرت بيعمل اول صفقه بس وباقي الصفقات ما بينسخ ؟؟؟

  6. #21
    الصورة الرمزية MR.dollar
    MR.dollar غير متواجد حالياً مشرف المتداول العربي
    تاريخ التسجيل
    Jun 2009
    الإقامة
    مصر
    المشاركات
    13,851

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة الباكري مشاهدة المشاركة
    الاكسبيرت بيعمل اول صفقه بس وباقي الصفقات ما بينسخ ؟؟؟
    ما هي الأخطاء التي تظهر لديك في الجورنال ؟ وما هي الإعدادات التي استخدمتها ؟
    توقيع العضو
    بناء أنظمة تداول آلي ويدوي لفحص سوق العملات ودمجها مع التحليل الفني لإتخاذ القرارات

  7. #22
    الصورة الرمزية صاحب قرار
    صاحب قرار غير متواجد حالياً عضو نشيط
    تاريخ التسجيل
    Apr 2009
    الإقامة
    السعودية
    العمر
    46
    المشاركات
    1,826

    افتراضي

    متااااااابع معكم

  8. #23
    الصورة الرمزية Forex TP
    Forex TP غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Aug 2015
    الإقامة
    المملكة العربية السعودية
    المشاركات
    66

    افتراضي

    مستر دولار ممكن اضافة للاكسبرت Slave
    يعمل مضاعفات بعدد استيبس steps معين
    مثلا نسخ من الماستر Master لوت 1 ثم في السليف Slave بعدد استيب مثلا 40 نقطة يعمل صفقة ثانية مضاعفة و هكذا ..

  9. #24
    الصورة الرمزية متداول - جديد
    متداول - جديد غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Mar 2010
    المشاركات
    244

    افتراضي

    الاكسبيرت شغعال ولكن كيف الغي التنبيهات كثيرة ومزعجة

  10. #25
    الصورة الرمزية Forex TP
    Forex TP غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Aug 2015
    الإقامة
    المملكة العربية السعودية
    المشاركات
    66

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة متداول - جديد مشاهدة المشاركة
    الاكسبيرت شغعال ولكن كيف الغي التنبيهات كثيرة ومزعجة
    حط الاكسبرت على الشارت تطلع لك اعدادات الاكسبرت من فوق فيه " Common " تحصل " Enable Alerts " عليها صح

    الي تسويه انك تشيل الصح ..

  11. #26
    الصورة الرمزية فارس007
    فارس007 غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Sep 2011
    المشاركات
    207

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة MR.dollar مشاهدة المشاركة
    هذا الموضوع هو النسخة الثانيه من الموضوع السابق

    https://forum.arabictrader.com/t200487.html

    - في هذه النسخة تم حل جميع مشاكل النسخ السابقه التي تم ذكرها في الموضوع بعد تجربتها وتقييمها من جميع الأعضاء
    - تغيير وتطوير طريقة النسخ بحيث يصبح النسخ أسرع ويمكنك النسخ إلى أكثر من منصة ميتاتريدر في نفس الوقت
    - إضافة بانل تظهر على الشارت لإظهار عدد الصفقات التي تم نسخها


    تركيب الإكسبرت

    إكسبرت AT Copier Master يتم وضعه في الميتاتريدر الذي يتم نسخ الصفقات المفتوحه منه في فولدر Experts في الميتاتريدر

    إكسبرت AT Copier Slave يتم وضعه في أي ميتاتريدر آخر الذي يتم نسخ الصفقات إليه ويوضع في فولدر Experts في الميتاتريدر

    في سكربت AT Copier Slave يوجد إعداد بإسم Master_Path في هذا الإعداد يجب أن تقوم بنسخ مسار فولدر الداتا الخاص بميتاتريدر الذي ستنسخ الصفقات منه
    يمكن الحصول على مسار Data Folder من الميتاتريدر إختر
    File -------------> Open Data Folder
    ثم إنسخ العنوان بشكل كامل
    مثال
    C:\Users\osama\AppData\Roaming\MetaQuotes\Terminal \C643B6860DDF9254620CA7F24C594834
    بدون أي إضافة أخرى أو تعديل

    يجب التأكد من تفعيل خاصية Allow DLL Imports في كلا الإكسبرتين

    بعد تركيب الإكسبرت وتفعيل الخطوات السابقه الآن هو جاهز للعمل ونسخ الصفقات بدون مشاكل

    إعدادت إكسبرت AT Copier Master

    ReverseTrades : تفعيل خيار عكس الصفقات
    Reverse_SL_TP_InReverseMode : عكس الهدف والأستوب عند عكس الصفقات
    CopyBuyOrders : نسخ صفقات الشراء
    CopySellOrders : نسخ صفقات البيع
    CopyPendingOrders : نسخ الأوامر المعلقه
    MagicNumberFilter : تفعيل فلتر فتح صفقات بماجيك نمبر محدد فقط
    MagicNumber : الماجيك نمبر
    CommentFilter : تفعيل فلتر فتح صفقات بكومنت محدد فقط
    Comments : الكومنت

    إعدادات سكربت AT Copier Slave

    Master_Path: مسار Data Folder لميتاتريدر الماستر
    MaxPipsDifference: أقصى فرق بالنقاط لسعر فتح الصفقه على الماستر والسعر الحالي
    AutoLotPercent: خاصية فتح حجم لوت بالنسبه والتناسب مع حجم الحساب للصفقه الأصليه
    MinimumLot : أقل حجم لوت في حال تفعيل الخيار السابق
    MultiLotNumber مضاعفه اللوت في حال تفعيل الخيار السابق
    CustomLot : تفعيل خيار تحديد حجم لوت يدوي للصفقه
    Lots : حجم اللوت
    AutoLot : نسخ حجم اللوت
    LotMultiplier : ضرب حجم اللوت المنسوخ في عامل معين
    MoneyManagment : فتح الصفقه بناء على نسبة مخاطره من رأس المال
    Risk : نسبة المخاطره
    OrderExpirationMinutes: عدد الدقائق المسموحه بين فتح الصفقه على الماستر ونسخ الصفقه
    CopyCloseOrder : تفعيل خيار نسخ إغلاق الصفقات بمجرد إغلاقها في ميتاتريدر الماستر
    CopyOrdersModifications : نسخ تعديل الأوامر (الهدف, الأستوب)
    CopyTakeProfit : تفعيل خيار نسخ الهدف
    ManualTakeProfit : الهدف اليدوي في حال تعطيل الخيار السابق
    CopyStopLoss : تفعيل خيار نسخ الأستوب لوز
    ManualStopLoss : الأستوب لوز اليديو في حال تعطيل الخيار السابق

    أخيرا مرفق الإكسبرت
    هو ده الي انت فالح فيه بس

    تعرف تعملنا مؤشر زي ده


  12. #27
    تاريخ التسجيل
    Jul 2011
    الإقامة
    السعودية
    المشاركات
    11,147

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة فارس007 مشاهدة المشاركة
    هو ده الي انت فالح فيه بس

    تعرف تعملنا مؤشر زي ده

    مؤشر تافه ل 3 اسباب:
    1) المتوسطات الكل يعرف عيوبها
    2) غباء التصميم يكفيك 24 و 16 بدلا من هذه الزحمة
    3) يفترض يكون مكانه على التشارت الاصلي
    +
    4) اي طفل رضيع برمجة يصممه--خصوصا انه لايحتاج اكثر من 9 اسطر
    5) سفالتك بقولك عن اسامة "هذا اللي انت فالح فيه" ----- ناسخ الصفقات من اعقد البرامج من جهة التصميم--يعني ماهو اي واحد يصممها ولكن سفلة الناس اعداء ماجهلوا

  13. #28
    تاريخ التسجيل
    Jul 2011
    الإقامة
    السعودية
    المشاركات
    11,147

    افتراضي

    لاتنسى ترمي المؤشر في صورتك في الزبالة حال قراءة هذا الرد

  14. #29
    الصورة الرمزية فارس007
    فارس007 غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Sep 2011
    المشاركات
    207

    افتراضي

    رميته في الزبالة

  15. #30
    تاريخ التسجيل
    Jul 2011
    الإقامة
    السعودية
    المشاركات
    11,147

    افتراضي

    أحسنت--كل المتوسطات اصبح حتى اجهل واحد يعلم انها ففتي ففتي والافضل تخرج من السقو نهائيا لايناسبك -- الجواب بين من عنوانه!
    السوق ذكاء اعتقد انك تفتقده وحتى في وجود الذكاء عند غيرك - لانجزم بنجاحه.

    دليل: انظر للصورة اسفل,

صفحة 2 من 5 الأولىالأولى 12345 الأخيرةالأخيرة

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17