PHP Warning: file_get_contents(https://www.arabictrader.com/arabictrader_storage_server/live_json_feed/at_latest_news.json): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in ..../includes/arabictrader/blue_theme/at_latest_news.php on line 13
النتائج 1 إلى 5 من 5
  1. #1
    الصورة الرمزية hamadov1
    hamadov1 غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Mar 2010
    الإقامة
    القاهره
    المشاركات
    493

    افتراضي رجاء من الاخوه المبرمجين المساعده في حل مشكله order modify error

    السلام عليكم ورحمة الله وبركاته الاكسبيرت التالي قمت بعمله علي برنامج Forex EA Generator وذلك لعدم امتلاكي خبره في البرمجه نهائيا

    المشكله التي تحدث هي في اوقات كثيره جدا لا يقوم الاكسبيرت بتعديل الستوب لوز والبروفت تارجت بعد فتح الصفقه .. صراحة لا اعلم هل هي مشكله من البروكو في تنفيذ الاوردر ام هي مشكله من الاكسبيرت

    وشكرا جزيلا مقدما

    الكود ....



    كود PHP:
    //-------------------------------------------------------------
    //  Etasoft Inc. Forex EA and Script Generator version 5.0   EA
    //-------------------------------------------------------------
    // Keywords: MT4, Forex EA builder, create EA, expert advisor developer

    #property copyright "Copyright © 2013, Etasoft Inc. Forex EA Generator v5.0"
    #property link      "http://www.********erator.com/"

    #include <stdlib.mqh>
    #include <WinUser32.mqh>

    // exported variables
    extern int SellStoploss34 5;
    extern int SellTakeprofit34 12;
    extern double BalanceRiskPercent34 10;
    extern int BuyStoploss33 5;
    extern int BuyTakeprofit33 12;
    extern double BalanceRiskPercent33 10;


    // local variables
    double PipValue=1;    // this variable is here to support 5-digit brokers
    bool Terminated false;
    string LF "\n";  // use this in custom or utility blocks where you need line feeds
    int NDigits 4;   // used mostly for NormalizeDouble in Flex type blocks
    int ObjCount 0;  // count of all objects created on the chart, allows creation of objects with unique names
    int current 0;

    datetime BarTime35 0;


    int init()
    {
        
    NDigits Digits;
        
        if (
    falseObjectsDeleteAll();      // clear the chart
        
        
        
    Comment("");    // clear the chart
    }

    // Expert start
    int start()
    {
        if (
    Bars 10)
        {
            
    Comment("Not enough bars");
            return (
    0);
        }
        if (
    Terminated == true)
        {
            
    Comment("EA Terminated.");
            return (
    0);
        }
        
        
    OnEveryNewBar35();
        
    }

    void OnEveryNewBar35()
    {
        
    PipValue 1;
        if (
    NDigits == || NDigits == 5PipValue 10;
        if (
    BarTime35 Time[0])
        {
            
    // we have a new bar opened
            
    BarTime35 Time[0]; // keep the new bar open time
            
    TechnicalAnalysis2x28();
            
    TechnicalAnalysis2x27();
            
    TechnicalAnalysis23();
            
    TechnicalAnalysis32();
            
        }
    }

    void TechnicalAnalysis2x28()
    {
        if ((
    iATR(NULLNULL,30,1) > iATR(NULLNULL,30,10)) && (Close[1] > Open[1]))
        {
            
    TechnicalAnalysis24();
            
        }
    }

    void TechnicalAnalysis24()
    {
        if (
    iMA(NULLNULL,20,0,MODE_EMA,PRICE_CLOSE,1) > iMA(NULLNULL,20,0,MODE_EMA,PRICE_CLOSE,5))
        {
            
    TechnicalAnalysis22();
            
        }
    }

    void TechnicalAnalysis22()
    {
        if (
    iCustom(NULL,0"Explosion_Gold",100,40,5,5,1,FALSE,FALSE,FALSE,FALSE,1,2) < iCustom(NULL,0"Explosion_Gold",100,40,5,5,1,FALSE,FALSE,FALSE,FALSE,2,5))
        {
            
    SellOrderRiskFixed34();
            
        }
    }

    void SellOrderRiskFixed34()
    {
        
    double lotsize MarketInfo(Symbol(),MODE_LOTSIZE) / AccountLeverage();
        
    double pipsize 0.1 10;
        
    double maxlots AccountBalance() / 100 BalanceRiskPercent34 lotsize pipsize;
        if (
    SellStoploss34 == 0) Print("OrderSend() error - stoploss can not be zero");
        
    double lots maxlots SellStoploss34 10;
        
        
    // calculate lot size based on current risk
        
    double lotvalue 0.001;
        
    double minilot MarketInfo(Symbol(), MODE_MINLOT);
        
    int powerscount 0;
        while (
    minilot 1)
        {
            
    minilot minilot MathPow(10powerscount);
            
    powerscount++;
        }
        
    lotvalue NormalizeDouble(lotspowerscount 1);
        
        if (
    lotvalue MarketInfo(Symbol(), MODE_MINLOT))    // make sure lot is not smaller than allowed value
        
    {
            
    lotvalue MarketInfo(Symbol(), MODE_MINLOT);
        }
        if (
    lotvalue MarketInfo(Symbol(), MODE_MAXLOT))    // make sure lot is not greater than allowed value
        
    {
            
    lotvalue MarketInfo(Symbol(), MODE_MAXLOT);
        }
        
    double SL Bid SellStoploss34*PipValue*Point;
        if (
    SellStoploss34 == 0SL 0;
        
    double TP Bid SellTakeprofit34*PipValue*Point;
        if (
    SellTakeprofit34 == 0TP 0;
        
        
    int ticket = -1;
        if (
    true)
        
    ticket OrderSend(Symbol(), OP_SELLlotvalueBid400"My Expert"10Red);
        else
        
    ticket OrderSend(Symbol(), OP_SELLlotvalueBid4SLTP"My Expert"10Red);
        if (
    ticket > -1)
        {
            if (
    true)
            {
                
    OrderSelect(ticketSELECT_BY_TICKET);
                
    bool ret OrderModify(OrderTicket(), OrderOpenPrice(), SLTP0Red);
                if (
    ret == false)
                Print(
    "OrderModify() error - "ErrorDescription(GetLastError()));
            }
                
        }
        else
        {
            Print(
    "OrderSend() error - "ErrorDescription(GetLastError()));
        }
    }

    void TechnicalAnalysis2x27()
    {
        if ((
    iATR(NULLNULL,30,1) > iATR(NULLNULL,30,10)) && (Close[1] < Open[1]))
        {
            
    TechnicalAnalysis25();
            
        }
    }

    void TechnicalAnalysis25()
    {
        if (
    iMA(NULLNULL,20,0,MODE_EMA,PRICE_CLOSE,1) < iMA(NULLNULL,20,0,MODE_EMA,PRICE_CLOSE,5))
        {
            
    TechnicalAnalysis26();
            
        }
    }

    void TechnicalAnalysis26()
    {
        if (
    iCustom(NULL,0"Explosion_Gold",100,40,5,5,1,FALSE,FALSE,FALSE,FALSE,0,2) < iCustom(NULL,0"Explosion_Gold",100,40,5,5,1,FALSE,FALSE,FALSE,FALSE,2,5))
        {
            
    BuyOrderRiskFixed33();
            
        }
    }

    void BuyOrderRiskFixed33()
    {
        
    double lotsize MarketInfo(Symbol(),MODE_LOTSIZE) / AccountLeverage();
        
    double pipsize 0.1 10;
        
    double maxlots AccountBalance() / 100 BalanceRiskPercent33 lotsize pipsize;
        if (
    BuyStoploss33 == 0) Print("OrderSend() error - stoploss can not be zero");
        
    double lots maxlots BuyStoploss33 10;
        
        
    // calculate lot size based on current risk
        
    double lotvalue 0.001;
        
    double minilot MarketInfo(Symbol(), MODE_MINLOT);
        
    int powerscount 0;
        while (
    minilot 1)
        {
            
    minilot minilot MathPow(10powerscount);
            
    powerscount++;
        }
        
    lotvalue NormalizeDouble(lotspowerscount 1);
        
        if (
    lotvalue MarketInfo(Symbol(), MODE_MINLOT))    // make sure lot is not smaller than allowed value
        
    {
            
    lotvalue MarketInfo(Symbol(), MODE_MINLOT);
        }
        if (
    lotvalue MarketInfo(Symbol(), MODE_MAXLOT))    // make sure lot is not greater than allowed value
        
    {
            
    lotvalue MarketInfo(Symbol(), MODE_MAXLOT);
        }
        
    double SL Ask BuyStoploss33*PipValue*Point;
        if (
    BuyStoploss33 == 0SL 0;
        
    double TP Ask BuyTakeprofit33*PipValue*Point;
        if (
    BuyTakeprofit33 == 0TP 0;
        
        
    int ticket = -1;
        if (
    true)
        
    ticket OrderSend(Symbol(), OP_BUYlotvalueAsk400"My Expert"10Blue);
        else
        
    ticket OrderSend(Symbol(), OP_BUYlotvalueAsk4SLTP"My Expert"10Blue);
        if (
    ticket > -1)
        {
            if (
    true)
            {
                
    OrderSelect(ticketSELECT_BY_TICKET);
                
    bool ret OrderModify(OrderTicket(), OrderOpenPrice(), SLTP0Blue);
                if (
    ret == false)
                Print(
    "OrderModify() error - "ErrorDescription(GetLastError()));
            }
                
        }
        else
        {
            Print(
    "OrderSend() error - "ErrorDescription(GetLastError()));
        }
    }

    void TechnicalAnalysis23()
    {
        if (
    Close[1] < iMA(NULLNULL,20,0,MODE_EMA,PRICE_CLOSE,1))
        {
            
    CloseOrder7();
            
        }
    }

    void CloseOrder7()
    {
        
    int orderstotal OrdersTotal();
        
    int orders 0;
        
    int ordticket[90][2];
        for (
    int i 0orderstotali++)
        {
            
    OrderSelect(iSELECT_BY_POSMODE_TRADES);
            if (
    OrderType() != OP_SELL || OrderSymbol() != Symbol() || OrderMagicNumber() != 1)
            {
                continue;
            }
            
    ordticket[orders][0] = OrderOpenTime();
            
    ordticket[orders][1] = OrderTicket();
            
    orders++;
        }
        if (
    orders 1)
        {
            
    ArrayResize(ordticket,orders);
            
    ArraySort(ordticket);
        }
        for (
    0ordersi++)
        {
            if (
    OrderSelect(ordticket[i][1], SELECT_BY_TICKET) == true)
            {
                
    bool ret OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), 4Red);
                if (
    ret == false)
                Print(
    "OrderClose() error - "ErrorDescription(GetLastError()));
            }
        }
        
    }

    void TechnicalAnalysis32()
    {
        if (
    Close[1] > iMA(NULLNULL,20,0,MODE_EMA,PRICE_CLOSE,1))
        {
            
    CloseOrder31();
            
        }
    }

    void CloseOrder31()
    {
        
    int orderstotal OrdersTotal();
        
    int orders 0;
        
    int ordticket[90][2];
        for (
    int i 0orderstotali++)
        {
            
    OrderSelect(iSELECT_BY_POSMODE_TRADES);
            if (
    OrderType() != OP_BUY || OrderSymbol() != Symbol() || OrderMagicNumber() != 1)
            {
                continue;
            }
            
    ordticket[orders][0] = OrderOpenTime();
            
    ordticket[orders][1] = OrderTicket();
            
    orders++;
        }
        if (
    orders 1)
        {
            
    ArrayResize(ordticket,orders);
            
    ArraySort(ordticket);
        }
        for (
    0ordersi++)
        {
            if (
    OrderSelect(ordticket[i][1], SELECT_BY_TICKET) == true)
            {
                
    bool ret OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), 4Red);
                if (
    ret == false)
                Print(
    "OrderClose() error - "ErrorDescription(GetLastError()));
            }
        }
        
    }



    int deinit()
    {
        if (
    falseObjectsDeleteAll();
        
        


  2. #2
    الصورة الرمزية kira-h
    kira-h غير متواجد حالياً عضو نشيط
    تاريخ التسجيل
    Oct 2011
    الإقامة
    المغرب
    المشاركات
    1,335

    افتراضي

    وعليكم السلام
    حسب التحديث الجديد للغة أصبح من الممكن عمل الصفقة بهدف وستوب مباشرة، لذلك ان تحتاج شرط التيكت بحيث ممكن أن لا يتحرك السعر بعد فتح الصفقة ثم لا يتحقق الشرط.
    استبدل دالتي البيع والشراء بما يلي :
    كود PHP:
    void SellOrderRiskFixed34() 

        
    double lotsize MarketInfo(Symbol(),MODE_LOTSIZE) / AccountLeverage(); 
        
    double pipsize 0.1 10
        
    double maxlots AccountBalance() / 100 BalanceRiskPercent34 lotsize pipsize
        if (
    SellStoploss34 == 0) Print("OrderSend() error - stoploss can not be zero"); 
        
    double lots maxlots SellStoploss34 10
         
        
    // calculate lot size based on current risk 
        
    double lotvalue 0.001
        
    double minilot MarketInfo(Symbol(), MODE_MINLOT); 
        
    int powerscount 0
        while (
    minilot 1
        { 
            
    minilot minilot MathPow(10powerscount); 
            
    powerscount++; 
        } 
        
    lotvalue NormalizeDouble(lotspowerscount 1); 
         
        if (
    lotvalue MarketInfo(Symbol(), MODE_MINLOT))    // make sure lot is not smaller than allowed value 
        

            
    lotvalue MarketInfo(Symbol(), MODE_MINLOT); 
        } 
        if (
    lotvalue MarketInfo(Symbol(), MODE_MAXLOT))    // make sure lot is not greater than allowed value 
        

            
    lotvalue MarketInfo(Symbol(), MODE_MAXLOT); 
        } 
        
    double SL Bid SellStoploss34*PipValue*Point
        if (
    SellStoploss34 == 0SL 0
        
    double TP Bid SellTakeprofit34*PipValue*Point
        if (
    SellTakeprofit34 == 0TP 0
        
        
    int ticket OrderSend(Symbol(), OP_SELLlotvalueBid4SLTP"My Expert"10Red); 



    void BuyOrderRiskFixed33() 

        
    double lotsize MarketInfo(Symbol(),MODE_LOTSIZE) / AccountLeverage(); 
        
    double pipsize 0.1 10
        
    double maxlots AccountBalance() / 100 BalanceRiskPercent33 lotsize pipsize
        if (
    BuyStoploss33 == 0) Print("OrderSend() error - stoploss can not be zero"); 
        
    double lots maxlots BuyStoploss33 10
         
        
    // calculate lot size based on current risk 
        
    double lotvalue 0.001
        
    double minilot MarketInfo(Symbol(), MODE_MINLOT); 
        
    int powerscount 0
        while (
    minilot 1
        { 
            
    minilot minilot MathPow(10powerscount); 
            
    powerscount++; 
        } 
        
    lotvalue NormalizeDouble(lotspowerscount 1); 
         
        if (
    lotvalue MarketInfo(Symbol(), MODE_MINLOT))    // make sure lot is not smaller than allowed value 
        

            
    lotvalue MarketInfo(Symbol(), MODE_MINLOT); 
        } 
        if (
    lotvalue MarketInfo(Symbol(), MODE_MAXLOT))    // make sure lot is not greater than allowed value 
        

            
    lotvalue MarketInfo(Symbol(), MODE_MAXLOT); 
        } 
        
    double SL Ask BuyStoploss33*PipValue*Point
        if (
    BuyStoploss33 == 0SL 0
        
    double TP Ask BuyTakeprofit33*PipValue*Point
        if (
    BuyTakeprofit33 == 0TP 0
         
        
    int ticket OrderSend(Symbol(), OP_BUYlotvalueAsk4SLTP"My Expert"10Blue); 

    آخر تعديل بواسطة kira-h ، 16-01-2016 الساعة 03:23 AM
    توقيع العضو
    متداول فوركس، ومبرمج mql

  3. #3
    الصورة الرمزية hamadov1
    hamadov1 غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Mar 2010
    الإقامة
    القاهره
    المشاركات
    493

    افتراضي

    شكرا جزيلا اخي الكريم علي إفادتك ومجهودك ولكن للأسف انا ليس لدي اي خبره في البرمجه كما ذكرت لذلك طلب منك ان تتكرم وتضيف الدالات الجديده علي الكود المرفق في اول مشاركه حتي يصبح بشكله النهائي لاني حاولت اعملت نسخ ولصق ولكن الموضوع انتهي بفشل ذريع

  4. #4
    الصورة الرمزية kira-h
    kira-h غير متواجد حالياً عضو نشيط
    تاريخ التسجيل
    Oct 2011
    الإقامة
    المغرب
    المشاركات
    1,335

    افتراضي

    الاكسبيرت بالمرفق
    بالتوفيق
    الملفات المرفقة الملفات المرفقة
    • نوع الملف: mq4 ea.mq4‏ (7.9 كيلوبايت, المشاهدات 26)
    توقيع العضو
    متداول فوركس، ومبرمج mql

  5. #5
    الصورة الرمزية hamadov1
    hamadov1 غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Mar 2010
    الإقامة
    القاهره
    المشاركات
    493

    افتراضي

    جزاك الله خيرا


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