I have a strategy for DAX / FDAX. I've set the conditions only to enter trades between 9:15 and 17:30:
if (ToTime(Time[0]) < tradetimeend
&& ToTime(Time[0]) > tradetimestart)
{
// Closes[1][0] refers to Dax dataseries current bar close
if (
Closes[1][0] >= EntryLong+0.5
)
{
EnterLong(DefaultQuantity, "LO");
}
the strategy enters a trade when a certain value in the index is reached.
sometimes it happens that the value is reached immediately at 9:00. because of the timefilter my strategy doesn't trade until 9:15. Exactly at 9:15 is takes the trade anyhow, although the condition was valid at 9:00 and not valid at 9:15. What can I do to prevent it from taking the trade at 9:15.
Comment