Profile Picture

Broker: SimTick call in relation to ShouldFill

Posted By alpha23 4 Years Ago
Message
Posted Sunday December 22 2013
Just to verify, SimTick is called before ShouldFill in the broker?

To eliminate the possibility of bad intraday data when using limit orders, I’m executing buy/cover only on open, high, and/or close and I’m setting the tick time in SimTick with the expectation that it is called before ShouldFill (vice versa for sell/short). The time is then used in ShouldFill to determine the return.

Any other ideas for ensuring bad data does not bias the return (other than the standard check bar data functionality)? The above methodology also gives an indication of how reliant the system is on the low of a single intraday bar.

Thanks, Duane
Posted Saturday January 04 2014
What is the expected response time for answers to questions? I have several questions that have been outstanding for up to 2 weeks.

Duane
Posted Sunday January 12 2014
...3 weeks and no response...
Posted Monday January 13 2014
The base implementation of SimTick processes orders for the tick which eventually can result in ShouldFill being called. So if you are overriding SimTick, then ShouldFill would be called when you make the base.SimTick() call. If you want to know what the current tick is, you can do something like this:

TickData _currentTick;
Symbol _currentTickSymbol;

public override void SimTick(Symbol symbol, TickData tick)
{
_currentTick = tick;
_currentTickSymbol = symbol;
base.SimTick(symbol, tick);
_currentTick = null;
_currentSymbol = null;
}

Then you can check those fields in the ShouldFill() method. Note that depending on how your simulation is set up and if it is creating ticks from bars, SimTick may not be called at all- SimBar() might be called instead.

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems