Download MetaTrader 5
To add comments, please log in or register
Having troubles understanding the code? Articles can help you!
Ernest Klokow
1069
Ernest Klokow 2015.06.11 08:37 
If I use the function iClose with a Shift == 0, will its value be changing as the price changes while on the current bar or will it wait for the close of the current bar? But then the value wiill be the same as iClose with a Shift == 1?
Paul B
173
Paul B 2015.06.11 08:44  

iClose returns Close price value for the bar of specified symbol with timeframe and shift. If shift is 0, then the close price for the current bar will be returned which is essentially the current price at the time the EA/Indicator last executes.

 

Ernest Klokow
1069
Ernest Klokow 2015.06.11 09:51  
Paul_B:

iClose returns Close price value for the bar of specified symbol with timeframe and shift. If shift is 0, then the close price for the current bar will be returned which is essentially the current price at the time the EA/Indicator last executes.

 

Paul_B:

iClose returns Close price value for the bar of specified symbol with timeframe and shift. If shift is 0, then the close price for the current bar will be returned which is essentially the current price at the time the EA/Indicator last executes.

 

Thank you for your response Paul. Do I understand correctly that the value of iClose with Shift == 0 will change all the time - like with every cycle of the EA? And be equal to the current price at the time of the cycle?
Ernest Klokow
1069
Ernest Klokow 2015.06.11 13:14  
Paul are you still there? Anyone else?
darksideofthemoon
57
darksideofthemoon 2015.06.11 16:19  

Well whenever you want to know how a particular entity behaves, simply test it out. All questions answered.

In example, start a new indicator (or EA) code and put Print(iClose(...,0)); in the main loop and see how it works.. Got it?

Alain Verleyen
Moderator
28551
Alain Verleyen 2015.06.11 16:44  
ernest02:
Thank you for your response Paul. Do I understand correctly that the value of iClose with Shift == 0 will change all the time - like with every cycle of the EA? And be equal to the current price at the time of the cycle?
Yes.
whroeder1
13610
whroeder1 2015.06.12 14:44  
ernest02: Do I understand correctly that the value of iClose with Shift == 0 will change all the time
What part of "essentially the current price" was unclear?
ydrol
594
ydrol 2015.06.12 14:49  
WHRoeder:
ernest02: Do I understand correctly that the value of iClose with Shift == 0 will change all the time
What part of "essentially the current price" was unclear?
Surely angevoyageurs answer of 'Yes' was both sufficient and efficient ? Arguably condescending ...
whroeder1
13610
whroeder1 2015.06.12 15:05  
ydrol:  Arguably condescending ...
"the sky is blue." Is it my understanding that the sky is blue? Arguably inaudible.You said it was a "dumb question" then after you get the answer you ask a "dumb question" again. There has be five examples of this in the last five days. Annoying.
ydrol
594
ydrol 2015.06.12 15:20  

When someone says they are asking a dumb question - and again asks a "dumb question" in response, why get annoyed? They have clearly admitted they are struggling to understand something. 

Anyways, Their second question was just seeking confirmation that they understood correctly. (which they did) . It's often useful to reflect one's understanding for confirmation. No need to get annoyed by it IMO

Alain Verleyen
Moderator
28551
Alain Verleyen 2015.06.13 08:59  
WHRoeder:
ydrol:  Arguably condescending ...
"the sky is blue." Is it my understanding that the sky is blue? Arguably inaudible.You said it was a "dumb question" then after you get the answer you ask a "dumb question" again. There has be five examples of this in the last five days. Annoying.

You will never learn?

You are the best contributor on this forum but you are also the most annoying, always being harsh, rude or arrogant. Can't you control yourself ?

/
To add comments, please log in or register