أعلى مشكلة في الرمز
Results 1 to 7 of 7

Thread: أعلى مشكلة في الرمز

  1. #1
    لقد حصلت على صعوبة صغيرة مع iHighest ، لا بد لي من العثور على أكبر إغلاق بين الشموع 6 و 4. الخطأ رمز من مؤشر الاختتام ولكن النتيجة ليست صحيحة

    كود مدرج #property version 1.00 #property description #include lt؛ stdlib.mqhgt؛ # تتضمن lt؛ stderror.mqhgt؛/- indior configurations #property indior_chart_window #property indior_buffers twoproperty indior_type1 DRAW_ARROW #property indior_width1 1 #property indior_color1 White #property indior_label1 Sell #property indior_type2 DRAW_ARROW #property indior_width2 1 #property indior_color2 White #property indior_label2 Buy int N؛ int FTimeFrame = 0؛/- indior buffers dual Buffer1 # 91؛ # 93 ؛؛ dual Buffer2 # 91؛ # 93 ؛؛/p ----------------------------------------------- ------------------- /| مخصص التهيئة الأولية تخدم |/p ----------------------------------------------- ------------------- int onInit () IndiorBuffers (2)؛ SetIndexBuffer (0 ، Buffer1)؛ SetIndexEmptyValue (0، 0)؛ SetIndexArrow (0، 242)؛ SetIndexBuffer (1، Buffer2)؛ SetIndexEmptyValue (1، 0)؛ SetIndexArrow (1، 241)؛ العودة (INIT_SUCCEEDED)؛/ ----------------------------------------------- ------------------- /| التكرار المخصص للخدمة/ ----------------------------------------------- ------------------- int OnCalculate (const int rates_total، const int prev_calculated، const datetime time # 91؛ # 93 ؛، const double available # 91؛ # 93؛ ، const double high # 91؛ # 93 ؛، const double low # 91؛ # 93 ؛، const double close # 91؛ # 93 ؛، Const extended tick_volume # 91؛ # 93 ؛، const long-term # 91؛ # 93 ؛، const int spread # 91؛ # 93؛ -RRB- int limit = rates_total - prev_calculated؛/- counting from 0 to rates_total ArraySetAsSeries (Buffer1، true)؛ ArraySetAsSeries (Buffer2، true)؛/- first zero إذا كانت (prev_calculated lt؛ 1) ArrayInitialize (Buffer1، 0)؛ ArrayInitialize (Buffer2، 0)؛ وإلا حد ؛/- حلقة رئيسية لـ (int I = limit-1؛ i gt؛ = 0؛ I--) إذا (I gt؛ = MathMin (5000-1، rates_total-1-50)) استمر ؛ bool Pattern = Open # 91؛ 1 I # 93؛ GT. إغلاق # 91؛ 1 I # 93؛ افتح # 91؛ 2 I # 93؛ GT. إغلاق # 91؛ 2 I # 93؛ افتح # 91؛ 3 I # 93؛ GT. إغلاق # 91؛ 3 I # 93؛ افتح # 91 ؛ 4 I # 93؛ لتر. إغلاق # 91؛ 4 I # 93 ؛؛ should (Pattern == true) N = iHighest (Symbol ()، PERIOD_CURRENT، MODE_CLOSE، 6 I، 4 I)؛ Buffer1 # 91؛ N # 93؛ = High # 91؛ N # 93؛ 30 * المرحلة. Assing Buffer1 مع عائد إغلاق أكبر (0)؛/ ----------------------------------------------- -------------------

  2. #2
    أعتقد أنك قمت بكتابة المكالمة بشكل خاطئ. Count هو عدد الأشرطة التي نظرت فيها إلى 6 i. من خلال تعيين بداية إلى 4 I ، فأنت تنظر إلى الحانات من 4 إلى 9 إذا كنت = 0. إذا كنت في الثانية ، فستبحث في الحانات من 6 إلى 13 عامًا. ربما تحتاج إلى تغيير العد إلى 3 لإلقاء نظرة على الجزء الرابع من السادس الحانات.

  3. #3
    مرحبا شكرا على الرد ، وهذا يعني أنك ترغب في تغيير الرمز؟ Inserted Code/- main loop for (int I = limit-1؛ i gt؛ = 0؛ I--) {if (I gt؛ = MathMin (5000-1، rates_total-1-50)) continue؛ bool Pattern = Open # 91؛ 1 I # 93؛ GT. إغلاق # 91؛ 1 I # 93؛ افتح # 91 ؛ اثنان I # 93؛ GT. Close # 91؛ two I # 93؛ افتح # 91؛ 3 I # 93؛ GT. إغلاق # 91؛ 3 I # 93؛ افتح # 91 ؛ 4 I # 93؛ لتر. إغلاق # 91؛ 4 I # 93 ؛؛ should (Pattern == true) N = iHighest (Symbol ()، PERIOD_CURRENT، MODE_CLOSE، 6 I، 3 I)؛ Buffer1 # 91؛ N # 93؛ = High # 91؛ N # 93؛ 30 * المرحلة ؛ حاولت ولكن الآن لا يعمل. أنا لا أفهم ما هو الخطأ لأن التغيير في شمعات الإشعال تعمل ولكن من أجل iHighset لا.

  4. #4
    يعود الأمر إليك لتغيير التعليمات البرمجية ثم تحديد ما إذا كان الرمز يعطي النتائج المتوقعة. يستند اقتراحي إلى ما أعتقد أنك تحاول فعله.

  5. #5
    لا بد لي من اكتشاف المؤشر الأقصى للشمعة مع الشمعة النهائية بين 4 و 6 ولكن لم أفهم أن عملية dell'iHighset. كيف يمكنك تعيين الشفرة يدويًا للعثور على هذه النتيجة؟

  6. #6
    أعتقد أنك تحتاج إلى تغيير: أدخل الرمز N = iHighest (الرمز () ، PERIOD_CURRENT ، MODE_CLOSE ، 6 I ، 4 I) ؛ to Inserted Code N = iHighest (Symbol ()، PERIOD_CURRENT، MODE_CLOSE، 3،4 I)؛

  7. #7
    بسبب MathTrader7 ، لقد كنت لطيفًا ، الآن الشفرة صحيحة وأنها تعمل بشكل رائع!

أذونات النشر

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  
  • رمز 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.