From what I understand, I need to first run this code to see what day it is:
{
/* If the day is Monday, and we want the value from Friday, we must subtract 3 days from the current date.
If the day is Tuesday-Friday, just subtract one day. */
if (Time[0].DayOfWeek == DayOfWeek.Monday)
timeOfInterest = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day - 3, 9, 30, 0);
else
timeOfInterest = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day - 1, 9, 30, 0);
}
Now I just want it run go short if the open is greater than previous close:
if (ToTime(Time[0]) == ToTime(9, 30, 0)
&& (ShowClose && ToDay(DateTime.Today) == ToDay(Time[0].Date)) PriorClose.Set(priordayClose);
&& Open[0] > PriorDayOHLC().PriorClose[1])
{
EnterShort(DefaultQuantity, "");
}
This doesn't seem to work as there are a lot of errors. Am I going down the right path? I just want to trade off a gap, I can figure out all of the other details but I can't get the model to pull up the right data.
Thanks
Comment