I am having a problem where a strategy is executing trades outside of the time parameters but what is strange is that for example I have a strategy that I have set the time to start trading above or equal to 072000 and I find that whilst it is not a big discrepancy it is entering trades at 071956 why would this occur? How can I prevent this?
Please see the code below.
if (Position.MarketPosition == MarketPosition.Flat)
{
if (entryOrder == null && (ToTime(Time[0]) >= 072000 && ToTime(Time[0]) <= 165959))
{
//Code here
}
suprsnipes

Comment