ALMOST DONE!!

 
i am almost done my first EA, i specifically decided to learn MQL4 just so i could code this EA, but i just have one final thing to do:

the way the EA works is, the high and the low of the price from 00:00 - 5:30 are taken, and a horizontal line is drawn at each point ( at the high and the low) therefore making a box.

then my ea places a long trade each time the price leaves the box to the top and a short trade each time it leaves the box to the bottom.

this is the basic idea, it is more complicated then that but it doesnt matter.

so far i have been manually inputing the top and bottom values of the box, but i want it to be done automatically, can anyone explain to me how to do this?


AGAIN: what i want the EA to do is find the highest and lowest point that the price reached from 00:00-5:30 each day, and then save them as the variables "pricehigh" and "pricelow" respectively.
 
nikolaou:
i am almost done my first EA, i specifically decided to learn MQL4 just so i could code this EA, but i just have one final thing to do:

the way the EA works is, the high and the low of the price from 00:00 - 5:30 are taken, and a horizontal line is drawn at each point ( at the high and the low) therefore making a box.

then my ea places a long trade each time the price leaves the box to the top and a short trade each time it leaves the box to the bottom.

this is the basic idea, it is more complicated then that but it doesnt matter.

so far i have been manually inputing the top and bottom values of the box, but i want it to be done automatically, can anyone explain to me how to do this?


AGAIN: what i want the EA to do is find the highest and lowest point that the price reached from 00:00-5:30 each day, and then save them as the variables "pricehigh" and "pricelow" respectively.

There a couple of ways you can do this.

One way would be this:

Use int BarShift = iBarShift( blah blah blah, datetime TimeHour(00) -- I would make this a variable ),

then get BarShift data and use on iHighest(blah blah blah, BarShift) This give you the bar shift you require to find the highest price of this. Do the same for the lowest except use TimeMinuite too.

I no this is rough, but it shud show you what u need to do. Obvoisly I havnt played around with it as I am having my own problems ;) Just look into iBarShift and iHighest, eg find out what information you cannot get, and get it and use it somhow.

Good luck hope I been a little help.