Download MetaTrader 5

Code to find the open and close price of previous bar

To add comments, please log in or register
Chris
26
Chris  

Hi,

I'm relatively new to programing MQL4 and would like to know how to code an expert to understand the open and close prices of the previous bar?

Any help would be appreciated.

Thanks,

Chris.

Keith
368
Keith  
chrisds9 wrote >>

Hi,

I'm relatively new to programing MQL4 and would like to know how to code an expert to understand the open and close prices of the previous bar?

Any help would be appreciated.

Thanks,

Chris.

PREVIOUS OPEN = Open[1];

PREVIOUS CLOSE = Close[1];

thats the easy part, to be useful you need to know how to select the currency they apply to and a whole bunch of other stuff,suggest you work through the book

or some samples in the code base, see top of page, search engine leads you to many useless results but is a necessary evil.

good luck

Keith

Chris
26
Chris  
kminler:

PREVIOUS OPEN = Open[1];

PREVIOUS CLOSE = Close[1];

thats the easy part, to be useful you need to know how to select the currency they apply to and a whole bunch of other stuff,suggest you work through the book

or some samples in the code base, see top of page, search engine leads you to many useless results but is a necessary evil.

good luck

Keith

Hi Keith,


I read the book already, it wasn't easy going but I think I've got a grasp of the basics of programming this language. I couldn't find the above information in it though.

Anyway thanks for your help.

Chris

tasaoirse
33
tasaoirse  
Chris:

Hi,

I'm relatively new to programing MQL4 and would like to know how to code an expert to understand the open and close prices of the previous bar?

Any help would be appreciated.

Thanks,

Chris.

how to code the "last previous bar close on upper or lower band"
Mladen Rakic
62824
Mladen Rakic  
tasaoirse:
how to code the "last previous bar close on upper or lower band"
That question does not make sense at all. What bands and what do bands have to do when it comes to close? What "last previous"?
To add comments, please log in or register