HighestLowest

0
(0)
ชื่อ:
Highest - Lowest
ผู้เขียน: lococo (2011.07.26 10:29)
ดาวน์โหลดแล้ว: 4789
ดาวน์โหลด:
Highest - Lowest 1
Highest-Lowest.mq4 (2.6 Kb) ดู

คำอธิบาย:

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, ริกดี |    
//|                                       Александър Пламенов Рядков |
//|                                            http://www.e2e-fx.net |
//+------------------------------------------------------------------+
#ลิขสิทธิ์ทรัพย์สิน "© 2007 ริกดี"
#ลิงค์คุณสมบัติ      "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; ฉัน < ขีด จำกัด; ฉัน ++) 
     {
       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

ยังไม่มีคะแนนโหวต! เป็นคนแรกที่ให้คะแนนโพสต์นี้.

ขออภัยที่โพสต์นี้ไม่มีประโยชน์สำหรับคุณ!

ให้เราปรับปรุงโพสต์นี้!

บอกเราว่าเราจะปรับปรุงโพสต์นี้ได้อย่างไร?



ผู้เขียน: ทีมงาน Forex Wiki
เราคือทีมผู้ซื้อขาย Forex ที่มีประสบการณ์สูง [2000-2023] ที่อุทิศตนเพื่อใช้ชีวิตในแบบของเรา. วัตถุประสงค์หลักของเราคือการได้รับอิสรภาพทางการเงินและอิสรภาพ, และเราได้ติดตามการศึกษาด้วยตนเองและได้รับประสบการณ์ที่กว้างขวางในตลาด Forex เพื่อเป็นหนทางในการบรรลุวิถีชีวิตที่ยั่งยืนด้วยตนเอง.