Hi,
So you can do as this :
double ClosePrice(string symbol, int timeframe=0, int position=1) { return iClose(symbol, timeframe, position); }
"position=1" is for one bar before current bar,And "timeframe=0" is for current chart timeframe,so you can leave them empty during function calling:
double price = ClosePrice("EURUSD");Regards.
Mehrdad Jeddi:
Hi,
So you can do as this :
"position=1" is for one bar before current bar,And "timeframe=0" is for current chart timeframe,so you can leave them empty during function calling:
Regards.Exactly what I was looking for. Thank you very much!
Marbo:
Exactly what I was looking for. Thank you very much!
You're welcome.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi guys,
pretty difficult to explain in a headline. I have this function:
And I call this function like this:
Now I want to define the default parameter "position" as 1 if there is no position parameter given.
So I want to do this:
And the result should be the closeprice of EURUSD H1 of candle 1.
Is that possible? I know it is when using some MT4 functions.