Einzelnen Beitrag anzeigen
  #3 (permalink)  
Alt 09.06.15
JoeDormann JoeDormann ist offline
Gesperrter Benutzer
 
Registriert seit: Sep 2011
Ort: Kassel
Beiträge: 749
JoeDormann befindet sich auf einem aufstrebenden Ast
JoeDormann eine Nachricht über Skype™ schicken
Standard

iHighest

Returns the shift of the maximum value over a specific number of bars depending on type.

int iHighest(
string symbol, // symbol
int timeframe, // timeframe
int type, // timeseries
int count, // cont
int start // start
);

Parameters

symbol

[in] Symbol the data of which should be used for search. NULL means the current symbol.

timeframe

[in] Timeframe. It can be any of ENUM_TIMEFRAMES enumeration values. 0 means the current chart timeframe.

type

[in] Series array identifier. It can be any of the Series array identifier enumeration values.

count=WHOLE_ARRAY

[in] Number of bars (in direction from the start bar to the back one) on which the search is carried out.

start=0

[in] Shift showing the bar, relative to the current bar, that the data should be taken from.

Returned value

The shift of the maximum value over a specific number of bars or -1 if error. To check errors, one has to call the GetLastError() function.

Example:

double val;
//--- calculating the highest value on the 20 consecutive bars in the range
//--- from the 4th to the 23rd index inclusive on the current chart
int val_index=iHighest(NULL,0,MODE_HIGH,x2,x1);
if(val_index!=-1) val=High[val_index];
else PrintFormat("Error in call iHighest. Error code=%d",GetLastError());


Daraus ergibt sich, das man beginnebd bei einem Offset von x1 kerzen z.B. x2 vorherige Kerzenhochs prüfen kann und den Höchstwert bekommt.
Ist doch easy.
Die MQL-Doku ist doch super, so wie sie ist.

LG jOE