Download MetaTrader 5

Open day price

To add comments, please log in or register
ashraf mohamed
131
ashraf mohamed  

Hi

I am try to write code by MQL4 for check open day price, any one know how we can calculate open day price?

Simon Gniadkowski
Moderator
18056
Simon Gniadkowski  
verofx:

Hi

I am try to write code by MQL4 for check open day price, any one know how we can calculate open day price?

iOpen(NULL, PERIOD_D1, 0);
ashraf mohamed
131
ashraf mohamed  
RaptorUK:



Thanks a lot

i have this code

if (Low[0] > High[1])

i need to replace low[0] by open day price

can i replace it like

if (iOpen(NULL,PERIOD_D1, 0) > High[1]);

will this work


thanks again

Simon Gniadkowski
Moderator
18056
Simon Gniadkowski  
verofx:

Thanks a lot

i have this code

if (Low[0] > High[1])

i need to replace low[0] by open day price

can i replace it like

if (iOpen(NULL,PERIOD_D1, 0) > High[1]);

will this work

It will to a degree, but in some cases it will return true even if . . iOpen(NULL,PERIOD_D1, 0) is equal to High[1] you need to take care when comparing double values, read this thread: Can price != price ?
Tjipke de Vries
6433
Tjipke de Vries  
if (iOpen(NULL,PERIOD_D1, 0) > High[1])......???????;

will this work  ???  

ofcours it can happen that the highprice closed bar lower timeframe daily is lower then openprice of the day

but What has to happen if the condition is true

there is no command to see at,........ before ;

ashraf mohamed
131
ashraf mohamed  

Thanks but expert did not work when i put this code

(iOpen(NULL,PERIOD_D1, 0)

if (iOpen(NULL,PERIOD_D1, 0) > High[1]);

but i found it work fine i replace it by old code

if (Low[0] > High[1])

any new idea about calculate open daily price,(15 min time frame)

another quetion

IS High[1] = open day price in 15 min frame???

Thanks

Tjipke de Vries
6433
Tjipke de Vries  
verofx:

Thanks but expert did not work when i put this code

(iOpen(NULL,PERIOD_D1, 0)

if (iOpen(NULL,PERIOD_D1, 0) > High[1]);

but i found it work fine i replace it by old code

if (Low[0] > High[1])

any new idea about calculate open daily price,(15 min time frame)

another quetion

IS High[1] = open day price in 15 min frame???

Thanks


looks like you have no idea what High Low Close Open stands for....

and what it means iHigh iLow, .....

To add comments, please log in or register