ساعدني في فهم الكود من فضلك!
Results 1 to 5 of 5

Thread: ساعدني في فهم الكود من فضلك!

  1. #1
    لقد بدأت تميل رمز mql4 ، وأواجه هذا كود:

    الكود المدرج/*/* my_DailyOpen_indior/*/* Revision 1.1 2005/11/13 Midnite/* Initial DailyOpen indior/* المنشأة مساءً/* # حقوق الطبع والنشر للملكية Midnite #property hyperlink [email protected] # property indior_chart_window #property indior_buffers 1 # property indior_color1 DodgerBlue #property indior_style1 two #property indior_width1 1 double double TodayOpenBuffer # 91؛ # 93 ؛؛ extern int TimeZoneOfData = 0؛/ ----------------------------------------------- ------------------- /| خدمة التهيئة المخصصة المخصصة |/ ----------------------------------------------- ------------------- int init () SetIndexStyle (0، DRAW_LINE)؛ SetIndexBuffer (0، TodayOpenBuffer)؛ SetIndexLabel (0، فتح). SetIndexEmptyValue (0،0.0)؛ عودة (0)؛/ ----------------------------------------------- ------------------- /| Custor وظيفة إزالة التطهير الداخلية |/ ----------------------------------------------- ------------------- int deinit () return (0)؛/ ----------------------------------------------- ------------------- /| خدمة التكرار الداخلي المخصص |/ ----------------------------------------------- ------------------- int start () int lastbar؛ int counted_bars = IndiorCounted ()؛ يجب (counted_barsgt؛ 0) counted_bars--؛ lastbar = Bars-counted_bars؛ DailyOpen (0، lastbar)؛ عودة (0) ؛/ ----------------------------------------------- ------------------- /| |/ ----------------------------------------------- ------------------- int DailyOpen (int offset، int lastbar) int shift؛ int tzdiffsec = TimeZoneOfData * 3600 ؛ barsper30 مزدوجة = 1.0 * PERIOD_M30Period () ؛/lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ ----- ------ thise line no clear me ------- bool ShowDailyOpenLevel = True؛/lastbar = barsperday 2؛/تأكد من قيامنا بضبط lastbar اليومي المفتوح = MathMin (Bars-20 * barsper30-1 ، lastbar) ؛/lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ lt؛ ---- --- هذا أيضًا غير واضح ------- لـ (shift = lastbar؛ shiftgt؛ = offset؛ shift--) TodayOpenBuffer # 91؛ shift # 93؛ = 0؛ يجب (ShowDailyOpenLevel) إذا (TimeDay (Time # 91؛ shift # 93؛ -tzdiffsec)! = TimeDay (Time # 91؛ shift 1 # 93؛ -tzdiffsec))/shift shift TodayOpenBuffer # 91؛ shift # 93؛ = فتح # 91؛ تحول # 93 ؛؛ TodayOpenBuffer # 91؛ shift 1 # 93؛ = 0؛/تجنب الدرج في السطر الآخر TodayOpenBuffer # 91؛ shift # 93؛ = TodayOpenBuffer # 91؛ shift 1 # 93 ؛؛ عودة (0)؛

    يمكن نفس توضيح هذين السطرين من التعليمات البرمجية ما يؤدون وكيف تعمل؟

    شكرا مسبقا.



  2. #2
    حسناً ، لقد تمكنت من التراجع ، ولكن لماذا في هذا السطر: lastbar = MathMin (Bars-20 * barsper30-1 ، lastbar) ؛ ما هو 20 و -1 ؟؟؟؟؟؟؟؟؟؟

  3. #3
    The same indior different writer but much more clearer:- Inserted Code / ------------------------------------------------------------------ /| Daily-Weekly Open.mq4 | /| [email protected] | /| http://www.learncurrencytrading.com/fxforum/blogs/djindyfx/| / ------------------------------------------------------------------ #property copyright [email protected] #property link http://www.learncurrencytrading.com/fxforum/blogs/djindyfx/ #property indior_chart_window #property indior_buffers 2 #property indior_color1 Aqua #property indior_color2 Red /-- buffers double dailyopen#91;#93;; double weeklyopen#91;#93;; double line; double d,w; / ------------------------------------------------------------------ /| Custom indior initialization function | / ------------------------------------------------------------------ int init() /-- indiors SetIndexStyle(0,DRAW_LINE,STYLE_DOT,1); SetIndexBuffer(0,dailyopen); SetIndexStyle(1,DRAW_LINE,STYLE_DASHDOT,1); SetIndexBuffer(1,weeklyopen); string dopen, wopen; dopen = Daily Open; wopen = Weekly Open; IndiorShortName(dopen); IndiorShortName(wopen); SetIndexLabel(0,dopen); SetIndexLabel(1,wopen); SetIndexDrawBegin(0,1); /SetIndexDrawBegin(1,1); /-- return(0); / ------------------------------------------------------------------ /| Custom indior deinitialization function | / ------------------------------------------------------------------ int deinit() /-- /ObjectDelete(Weekly Open); /ObjectDelete(Daily Open); /-- return(0); / ------------------------------------------------------------------ /| Custom indior iteration function | / ------------------------------------------------------------------ int begin () int counted_bars=IndiorCounted(); int limit, I; /-- if(counted_bars==0) /0 /d=Period(); /if (dgt;240)return(-1); ObjectCreate(Weekly Open,OBJ_HLINE,0,0,0); ObjectCreate(Daily Open,OBJ_HLINE,0,0,0); /0 if(counted_barslt;0) return(-1); limit=(Bars-counted_bars)-1; for(I=limitation; igt;=0; I--) /0 if(1==TimeDayOfWeek(Time#91;I#93;-RRB- 1! =TimeDayOfWeek(Time#91;I 1#93;-RRB-) /1 w=Open#91;I#93;; ObjectMove(Weekly Open,0,Time#91;I#93;,line); /2 if (TimeDay(Time#91;I#93;-RRB-! =TimeDay(Time#91;I 1#93;-RRB-) /3 d=Open#91;I#93;; ObjectMove(Daily Open,0,Time#91;I#93;,line); /3 weeklyopen#91;I#93;=w; dailyopen#91;I#93;=d; /0 /-- return(0); / ------------------------------------------------------------------ )

  4. #4
    كان لدي بعض الأسئلة حول ما كان يقوم به IndiorCounted () وكتب حداثة لغرض وحيد هو إظهار ما يعود به IndiorCounted () إنه هنا:
    http://forum.mql4.com/47935. أنا أفكر في التغيير من استخدام IndiorCounted () إلى استخدام صفيف Time [] والاحتفاظ بآخر معالج في عامل وقت ثابت لتحديد مدى عودة الحساب.

  5. #5
    Quote Originally Posted by ;
    كان لدي أي أسئلة حول ما كتبه IndiorCounted () وقام بعمل داخلي بهدف وحيد هو إظهار ما ينتج عنه IndiorCounted (). ومن هنا:
    http://forum.mql4.com/47935. أنا أفكر في التغيير من استخدام IndiorCounted () إلى استخدام صفيف Time [] والحفاظ على آخر معالج في متغير وقت ثابت لتحديد مدى عودة الحساب.
    مرحبًا lukeb شكرا على المعلومات ، سوف نلقي نظرة.

أذونات النشر

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