Download MetaTrader 5

Open day price

To add comments, please log in or register
Having difficulties in understanding the Trading Signals service? Read the article!
ashraf mohamed
131
ashraf mohamed 2013.11.15 23:13 

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
17999
Simon Gniadkowski 2013.11.15 23:26  
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 2013.11.16 13:48  
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
17999
Simon Gniadkowski 2013.11.16 16:30  
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
6314
Tjipke de Vries 2013.11.16 17:51  
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 2013.11.16 21:48  

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
6314
Tjipke de Vries 2013.11.16 22:24  
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