problem with iBarShift() - need help please
string SEVTIME=StringSubstr(TYPE,144+zp,20); int shift=iBarShift(pair,PERIOD_M1,SEVTIME);
int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)
Third argument is NOT a string
WHRoeder:
Thank you very much for your help.
int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)
Third argument is NOT a string
My EA reads the server time and the currency from a File and then it tries to use the data in my iBraShift() function to get the opening price of a Bar which Shift point at. Here is the code below:
Please note that pair refers to the currency pair, for example, "EURUSD" and SEVTIME refers to server time, for example, "2012.02.09 16:31:37". Now, here is my problem" If If I use the code as it is above I get Bar# something like 3400 etc. However, If I change the code a little bit I get the result I want. This is the revised code:
Therefore, the problem is SEVTIME value. If I use the Print to see contents of SEVTIME, I can see it without any problem. How can I overcome this problem? Thank you in advance for your help.