بحاجة الى مساعدة مع رمز
Results 1 to 3 of 3

Thread: بحاجة الى مساعدة مع رمز

  1. #1
    اهلا بالجميع. أحتاج إلى مساعدة بشأن الشفرة التي تم لصقها أدناه. إنه تنبيه عبر متوسط ​​متحرك بسيط أنني قمت بتعديل بعض الشيء وأضف تنبيهًا عبر البريد الإلكتروني. لست متأكدًا مما إذا كان تنبيه البريد الإلكتروني سيعمل مع استمرار تلقي رسالة خطأ واحدة عندما أقوم بترجمة. لقد قمت بلصق الكود أدناه

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

    الخطأ يقول ... '\ end_of_program' - قوس يسرى غير متوازن



    // ----------------------------------------------- -------------------
    //| MACrossEarlyAlert.mq4 |
    //| ماريانو سيلفا
    //| |
    // ----------------------------------------------- -------------------
    #property copyright Mariano Silva
    # رابط العقار

    #property indior_chart_window
    //---- معلمات الإدخال
    extern bool EmailAlert = false؛
    extern Int FastMAPeriod = 50؛
    extern string Type = 0-SMA، 1-EMA؛
    extern int FastMAType = 1؛
    extern Int SlowMAPeriod = 1؛
    extern Int SlowMAType = 0؛
    extern Int EarlyPips = 15؛
    extern Int ResetAlert = 20؛
    extern color LineColor = Orange؛
    // ----------------------------------------------- -------------------
    //| وظيفة التهيئة مؤشر مخصص
    // ----------------------------------------------- -------------------
    int init ()
    {
    //---- المؤشرات
    //----
    عودة (0)؛
    }
    // ----------------------------------------------- -------------------
    //| وظيفة مخصصة مؤشر تسييل |
    // ----------------------------------------------- -------------------
    int deinit ()
    {
    string LineName؛
    //----
    LineName = StringConenate (FastMAPeriod،، SlowMAPeriod، MA Cross)؛
    ObjectDelete (LineName)؛
    //----
    عودة (0)؛
    }
    // ----------------------------------------------- -------------------
    //| وظيفة التكرار مؤشر مخصص
    // ----------------------------------------------- -------------------
    بداية int ()
    {
    //int counted_bars = IndiorCounted ()؛

    مزدوجة FastMALastBar ، SlowMalastBar ، PriceToCross ، عبر ، FastMATest ، SlowMATest ؛
    bool AlertEnabled = true؛
    string LineName = StringConenate (FastMAPeriod،، SlowMAPeriod، MA Cross)؛


    //LineName = StringConenate (FastMAPeriod،، SlowMAPeriod، MA Cross)؛

    //----

    إذا (NewBar ())
    {
    FastMALastBar = IMA (NULL، 0، FastMAPeriod، 0، FastMAType، PRICE_CLOSE، 1)؛
    SlowMALastBar = IMA (NULL، 0، SlowMAPeriod، 0، SlowMAType، PRICE_CLOSE، 1)؛
    PriceToCross = فتح [0]؛
    الصليب = FastMALastBar-SlowMALastBar.


    إذا (Crossgt، 0.0)
    {
    بينما (Crossgt، 0.0)
    {
    PriceToCross = PriceToCross نقطة.
    FastMATest = CalcMA (FastMAPeriod، FastMAType، PriceToCross، FastMALastBar)؛
    SlowMATest = CalcMA (SlowMAPeriod، SlowMAType، PriceToCross، SlowMALastBar)؛
    الصليب = FastMATest-SlowMATest.
    }
    }
    آخر
    {
    بينما (Crosslt، 0.0)
    {
    PriceToCross = PriceToCross نقطة.
    FastMATest = CalcMA (FastMAPeriod، FastMAType، PriceToCross، FastMALastBar)؛
    SlowMATest = CalcMA (SlowMAPeriod، SlowMAType، PriceToCross، SlowMALastBar)؛
    الصليب = FastMATest-SlowMATest.
    }
    }


    ObjectDelete (LineName)؛
    drawLine (PriceToCross، LineName، LineColor، 0)؛

    }

    إذا (AlertEnabled)
    {
    إذا (MathAbs (إغلاق [0] -PriceToCross) لتر. = EarlyPips * نقطة)
    {
    تنبيه (Close to، FastMAPeriod،، SlowMAPeriod، MA Cross on، Symbol ()،، Period ())؛

    إذا كان EmailAlert SendMail (Close to، FastMAPeriod،، SlowMAPeriod، MA Cross on، Symbol ()،، Period ()؛

    AlertEnabled = كاذبة؛
    }
    }
    آخر
    {
    إذا (MathAbs (إغلاق [0] -PriceToCross) GT؛ = ResetAlert * نقطة)
    {
    AlertEnabled = صحيح.
    }
    }





    //----
    عودة (0)؛
    }
    // ----------------------------------------------- -------------------


    double CalcMA (int MAPeriod، int MAType، double PriceTest، double LastMA)
    {
    مزدوج ماجستير ، العلاقات العامة ؛

    التبديل (MAType)
    {
    الحالة 0:
    {
    MA = ((LastMA * MAPeriod) من مسافة قريبة، [MAPeriod] PriceTest)MAPeriod.
    استراحة؛
    }
    حالة 1:
    {
    العلاقات العامة = 2.0(MAPeriod 1)؛
    MA = PriceTest * العلاقات العامة LastMA * (1-العلاقات العامة)؛
    استراحة؛
    }
    }

    عودة (MA)؛
    }

    void drawLine (ضعف lvl ، اسم السلسلة ، Col col ، نوع int)
    {
    ObjectCreate (الاسم ، OBJ_HLINE ، 0 ، الوقت [0] ، lvl) ؛/، الوقت [0] ، lvl) ؛

    إذا (اكتب == 1)
    ObjectSet (الاسم ، OBJPROP_STYLE ، STYLE_SOLID) ؛
    آخر
    ObjectSet (الاسم ، OBJPROP_STYLE ، STYLE_DOT) ؛

    ObjectSet (الاسم ، OBJPROP_COLOR ، كول) ؛
    ObjectSet (الاسم، OBJPROP_WIDTH، 1)؛

    إرجاع؛
    }


    bool NewBar () {
    ثابت تاريخ Datetime.
    datetime curbar = Time [0]؛
    إذا (lastbar! = curbar)
    {
    lastbar = curbar.
    العودة (صحيح) ؛
    }
    else {
    عودة كاذبة)؛
    }
    }

  2. #2
    1 مرفق (ق) شكرا لردكم Rbi. لقد أرفقت ملف MQL من الكود أدناه. أريد أن يصدر المؤشر تنبيهًا وأرسل لي رسالة إلكترونية مرة واحدة فقط ، إذا وصل السعر إلى 15 نقطة من تقاطع 34EMA8EMA كروس. يجب إعادة تعيين الشرط بعد تحريك السعر للرقم المحدد. من النقاط (في هذه الحالة 20 نقطة) بعيدا عن 34EMA8EMA Cross. أنا حاولت التغيير والتبديل في التعليمات البرمجية والآن أحصل على 3 أخطاء: ')' - المعلمات الخاطئة العد 'آخر' - رمز غير متوقع ”MAType” - خطأ داخلي أي مساعدة سيكون موضع تقدير كبير. شكر
    https://www.forexdrop.com/attachment...2240799907.mq4

  3. #3
    مجرد نشر ملف MQL ... لا أحد يحب قراءة هذا الموضوع دون مترجم ...

أذونات النشر

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  
  • رمز BB مفعل
  • الابتسامات مفعلة
  • رمز[IMG] مفعل
  • رمز [VIDEO] مفعل
  • رمز HTML غير مفعل
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.