最高 – 最低

コンテンツ
0
(0)
名前:
最高 - 最低
著者: 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 "n" バー; 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, リックD |    
//|                                       Александър Пламенов Рядков |
//|                                            http://www.e2e-fx.net |
//+------------------------------------------------------------------+
#財産の著作権 "© 2007 リックD"
#プロパティリンク      "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) 
       戻る (-1);
//----  
   もしも(counted > 0) 
       counted--;
   int limit = Bars - counted;
//----  
   ために(int i = 0; 私 < 限界; i++) 
     {
       UpperBuf[私] = iHigh(ヌル, 0, iHighest(ヌル, 0, モード_ハイ, N, 
                           私)) + N2*Point;
       LowerBuf[私] = iLow(ヌル, 0, iLowest(ヌル, 0, モード_ロー, N, 私)) - 
                          N2*Point;
     }
  }
//+------------------------------------------------------------------+

Choose for N2 "0" and you have the same. 見る http://codebase.mql4.com/1099

この投稿は役に立ちました?

星をクリックして評価してください!

平均評価 0 / 5. 投票数: 0

これまでのところ投票はありません! この投稿を最初に評価してください.

この投稿が役に立たなかったことをお詫び申し上げます!

この投稿を改善しましょう!

この投稿を改善する方法を教えてください?



著者: 外国為替ウィキチーム
私たちは経験豊富な外国為替トレーダーのチームです [2000-2023] 自分の思いどおりに人生を生きることに専念している人. 私たちの主な目的は、経済的自立と自由を獲得することです, 私たちは自立可能なライフスタイルを実現する手段として、独学で外国為替市場での豊富な経験を積んできました。.