I have read a number of threads about this but I'm still having problems. I found some code that should do this for me. But, using this against the YM (mini dow) I am not getting the correct value back. Should the following code obtain the open value on February 22nd 2010? What is the time zone of the time input? I used 9:30 because of the example I found. 7:30 is the open time for me as I live in the MST timezone. My example code follows:
Datetime datetoget;
datetoget = new DateTime(2010, 2, 22, 9, 30, 0);
int barsAgo = GetBar(datetoget);
Print(datetoget+" " + PriorDayOHLC().PriorOpen[barsAgo]);
NOTE: this output 2/22/2010 9:30:00 AM 10139
Comment