Get high price in specific times

 

hello

I want to get the highest and lowest price in the first 10 candels in the 30 min chart(00:00 - 4:30).

can someone please post a code? i messed up with Highest() and Lowest()

Thanks in advance

 

if you have other related questions after this, the best place to make sure you get an answer is in the navigator search of metaeditor, but here's the answer to your current question.

the funticons that allows you to find the high or low are the "iHigh" or "iLow". here's how to set them up.

//Global Variables

extern double LowShift = 30;

extern double HighShift = 30;

//variable begin

double 10H = High;

double 10L = Low[Lowest (NULL, 0, MODE_LOW, LowShift, 1)];

"NULL" and the "0", just mean current pair/timeframe, if you insist on making it the 30 minute timeframe, change "0" to 20

the "1" makes it start it's info at the first completed bar back, i ALWAYS have this as at least 1 because the current high changes too frequently, it messes up your data.

 
Eaglehawk:
if you have other related questions after this, the best place to make sure you get an answer is in the navigator search of metaeditor, but here's the answer to your current question.

the funticons that allows you to find the high or low are the "iHigh" or "iLow". here's how to set them up.

//Global Variables

extern double LowShift = 30;

extern double HighShift = 30;

//variable begin

double 10H = High;

double 10L = Low[Lowest (NULL, 0, MODE_LOW, LowShift, 1)];

"NULL" and the "0", just mean current pair/timeframe, if you insist on making it the 30 minute timeframe, change "0" to 20

the "1" makes it start it's info at the first completed bar back, i ALWAYS have this as at least 1 because the current high changes too frequently, it messes up your data.

excuse me, i forgot to specify where in the navigator , when you open the window, normally there's an example at the bottom, that's what i usually look at, not the format on the top .

 

thank you very much :-)

 

Hello again

i have this code :

double highp = High;

Print(highp);

and this is example of the output i get

2006.10.12 17:52:46 2006.10.06 19:59 2pip EURUSD,M30: 1.2713

2006.10.12 17:52:46 2006.10.06 19:55 2pip EURUSD,M30: 1.2713

2006.10.12 17:52:46 2006.10.06 19:52 2pip EURUSD,M30: 1.2713

2006.10.12 17:52:46 2006.10.06 19:47 2pip EURUSD,M30: 1.2713

2006.10.12 17:52:46 2006.10.06 19:44 2pip EURUSD,M30: 1.2713

2006.10.12 17:52:46 2006.10.06 19:40 2pip EURUSD,M30: 1.2713

i only want the high of the first 10 bars on each day and the i get the output every 5 min' ,why is that?

 

from the looks of things, you have your code set to look back "30" bars, try changing that to "10" ,

(second to last number)

 

i tried that also and i get the same output

maybe theres a different way to do this?

 
pooshkin:
Hello again

i have this code :

double highp = High;

Print(highp);

and this is example of the output i get

2006.10.12 17:52:46 2006.10.06 19:59 2pip EURUSD,M30: 1.2713

2006.10.12 17:52:46 2006.10.06 19:55 2pip EURUSD,M30: 1.2713

2006.10.12 17:52:46 2006.10.06 19:52 2pip EURUSD,M30: 1.2713

2006.10.12 17:52:46 2006.10.06 19:47 2pip EURUSD,M30: 1.2713

2006.10.12 17:52:46 2006.10.06 19:44 2pip EURUSD,M30: 1.2713

2006.10.12 17:52:46 2006.10.06 19:40 2pip EURUSD,M30: 1.2713

i only want the high of the first 10 bars on each day and the i get the output every 5 min' ,why is that?

output of every five minutes, this leads me to believe you are looking at a five minute chart, and a new candle is formed every five minutes. that simple. as long as you make sure that the ihigh function is only looking at the last ten bars, there should be no reason to worry.

Reason: