Hi,
The synchronization of bars between applications (on my end) and the wealth-lab becomes serious issue when the scale of strategies narrows down to intraday bars.
In that sense, I happen to use ConvertDateToBar function extensively while compiling my strategies.
So, my curiosity:
What does ConvertDateToBar returns when exactMatch is set to True yet exact date is not located?
I did not come up with a decent answer on wealthscript manual, and did not find anything related in the forum as well. And, the quickref also fell short of answering this question:
Thanks in advance for your help,
Aykut Sarıbıyık
QuickRef defines this function as follows:
QUOTE:
ConvertDateToBar
int ConvertDateToBar(DateTime date, bool exactMatch);
Returns the bar number that matches the DateTime provided in the date parameter. If exactMatch is true, the precise DateTime value must be located in the Bars object. Otherwise, the first bar whose DateTime is greater than or equal to the specified date is returned.
Size:
Color:
Hi,
I believe that it should return -1.
Size:
Color:
CODE:
Please log in to see this code.
Size:
Color:
Thank you both.
Kind regards,
Size:
Color: