View Single Post
  #4 (permalink)  
Old 09-12-2006, 01:02 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Cool iHigh explanation

Quote:
Originally Posted by knili
Hello all,
I need to know how is it possible to get for example the highest price on the current closed candle of let say the 1 min and 5 min chart at the sametime.
I’m using Interbank Fx and I the way I’m running my program is by attaching it to the either 1 min or 5 min chart. Is this the correct way?

So I have High[1], it will give me the high of the chart I’m running the program against. Is there anyway I can get both High[1] of 1 min and 5 min chart?

Thanks
Kam
Hi Kam,

This is iHigh explanation:


iHigh:


Syntax:

PHP Code:
double iHighstring      symbolint timeframeint shift

Description:

The iHigh function returns the High price for the given bar (the shift parameter is the bar number) of the given symbol and timeframe. The function returns 0 if the history data not loaded.
Note: If you want to get the High price (of a bar) of the current chart (symbol and timeframe) use High[int shift] function.

Parameters:

string symbol:
The symbol (currency pair) of the chart you want to get its bars number.
Use NULL if you want to use current symbol.

int
timeframe:
The timeframe (in integers, ex: 1,5,30,60 etc) of the chart you want to get its bars number.
Use 0 if you want to use current timeframe.

int
shift:
The index of the bar you want to get its High price.

Example:

PHP Code:
Print("Current High price for      USDCHF H1: ",iHigh("USDCHF",PERIOD_H1,i)); 
for more details: http://www.metatrader.info/node/124
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Reply With Quote