HighestLowest

0
(0)
اسم:
Highest - Lowest
مؤلف: lococo (2011.07.26 10:29)
تم التنزيل: 4789
تحميل:
Highest - Lowest 1
Highest-Lowest.mq4 (2.6 كيلو بايت) منظر

وصف:

After a while, searching the MQL4 community looking for an explanation on how to calculate the highest and lowest values for a data series over "ن" الحانات; I end up with this indicator that display exactly that.

There are various post explaining how to use iHighest and iLowest, i acknowledge all of them. This is just an application of it that suited my needs.

Feel free to use it and modify it.

صورة:

Highest - Lowest 2

 

 

There is another indicator I think doing the same called i-HighLow

//+------------------------------------------------------------------+
//|                                                    i-HighLow.mq4 |
//|                                          حقوق النشر © 2007, RickD |    
//|                                       Александър Пламенов Рядков |
//|                                            http://www.e2e-fx.net |
//+------------------------------------------------------------------+
#property copyright "© 2007 RickD"
#property link      "www.e2e-fx.net"
//----
#define major 1
#define minor 0
//----
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1  Gold
#property indicator_color2  DodgerBlue
//----
extern int N = 20;
extern int N2 = 5;
//----
double UpperBuf[];
double LowerBuf[];
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void init()
  {       
   SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 1);
   SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 1);
//----   
   SetIndexDrawBegin(0, N);
   SetIndexDrawBegin(1, N);
//----
   SetIndexBuffer(0, UpperBuf);
   SetIndexBuffer(1, LowerBuf);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void deinit() 
  {
//----
  }  
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void start() 
  {
   int counted = IndicatorCounted();
//----
   لو(counted < 0) 
       return (-1);
//----  
   لو(counted > 0) 
       counted--;
   int limit = Bars - counted;
//----  
   ل(int i = 0; أنا < limit; i++) 
     {
       UpperBuf[أنا] = iHigh(باطل, 0, iHighest(باطل, 0, MODE_HIGH, N, 
                           أنا)) + N2*Point;
       LowerBuf[أنا] = iLow(باطل, 0, iLowest(باطل, 0, MODE_LOW, N, أنا)) - 
                          N2*Point;
     }
  }
//+------------------------------------------------------------------+

Choose for N2 "0" and you have the same. يرى http://codebase.mql4.com/1099

كم كانت هذه المشاركة مفيدة?

انقر على نجمة لتقييمه!

متوسط ​​تقييم 0 / 5. عدد الأصوات: 0

لا توجد أصوات حتى الآن! كن أول من يقيم هذا المنصب.

نأسف لأن هذه المشاركة لم تكن مفيدة لك!

دعونا تحسين هذا المنصب!

أخبرنا كيف يمكننا تحسين هذه المشاركة?



مؤلف: فريق ويكي الفوركس
نحن فريق من متداولي الفوركس ذوي الخبرة العالية [2000-2023] الذين يكرسون أنفسهم لعيش الحياة بشروطنا الخاصة. هدفنا الأساسي هو تحقيق الاستقلال المالي والحرية, وتابعنا التعليم الذاتي واكتسبنا خبرة واسعة في سوق الفوركس كوسيلة لتحقيق أسلوب حياة مستدام ذاتيًا.