View Full Version : Fills using Esignal $playback
11-28-2005, 10:33 AM
Is there some documentation available for the logic of fills using the Esignal $Playback feature?
I have an EFS which works fine firing orders to NT but the fills have some sort of confusing behavior.
For example, YM futures contract 1 minute bars. To put it simply the script gets a signal and says to buy on the open of the next bar. Say the bar opens at bid 10700 ask 10701 during normal market hours you would expect to be filled somewhere around 10701 or 10702 if the size was there.
The problem lies in the fact that I am getting fills that are the high of the bar even if the bar is 12 points long has a high of 10712. That is 10 points of slippage which doesn't mimic real life. I have checked the Simulator options and slippage is zero but I don't even think that applies to Replay.
Can someone shed some light on this?
11-28-2005, 11:08 AM
If you are referring to the NinjaTrader simulation engine, a market order will fill upon the next market data event triggered after the order has reached a working state which is determined by the delay properties in the simulator tab.
Buy --> Fill at current ask or worse depending on ask volume and order quantity
Sell --> Fill at current bid or worse depending on bid volume and order quantity
11-28-2005, 11:42 AM
How far are you away from creating some eSignal code for NT? Is there something basic that you can submit in the next day or so? I will send you a nice NinjaTrader hat! eSignal just created a dedicated NinjaTrader forum at
and I would like to submit some EFS examples as soon as possible.
11-28-2005, 11:52 AM
So, I am guessing this is affected by the speed by which I playback. I have been testing it at different speeds. At 40x it gives considerably worse fills than at 1x. So I assume that the delay in ticks during fast periods is when Ninja receives the working order status. I am not sure this is workable for me unless I have to work backtests without acceleration.
11-28-2005, 11:59 AM
Or set the delay parameters to zero. In any case, I am not sure how eSignal sends data at an accelerated rate. For example, do they send the same data at smaller intervals or do they only send what's changed at the updated interval? If you are looking for a pure backtest you may be pressed to get it with this combination. The reason is, you are backtesting against a live simulator as opposed to a backtest engine which will give you the back test fills you are looking for.
11-28-2005, 12:05 PM
Delay parameters in options were set to zero but default to 1ms.
Esignal has the option of accelerating the playback of ticks up to any speed you wish. I usually run backtests at 20x or 40x. It seems that by the time NT has set itself to an order confirmed status in these time frames the 1 minute bar is already done. At really fast speeds I have seen fills in backtest above or below the parameters of the bar that the signal should have bought or sold on the open of the bar.
11-29-2005, 01:57 PM
I went to post a working code on the Esignal board but the NinjaTrader forum seems to be set up not to allow posts with attachments. If you can change it to allow attachments I will post a test file that works fine with the Esignal/Ninja interface except it will still have the issue described in the earlier posts of bad fills on acclerated data.
11-30-2005, 05:27 AM
Thanks Bleemus. I am looking into this right now.
11-30-2005, 10:15 AM
Bleemus, go ahead and try the eSignal forum again. It should be corrected according to eSignal support.
11-30-2005, 10:25 AM
The file has been uploaded to the Esignal forum. Take it for a test drive.
I have downloaded your EFS post for automated trading with eSignal. It works great. Thank you for posting it. I would also like to cancel , change, etc., orders, but can not figure how to obtain the current orderId string to reference the current open order. I also would like to see a sample code, in EFS language, to obtain the current strategyId string. Could you please post a sample EFS code to show how to obtain the orderId and strategyId?
12-10-2005, 04:51 AM
Can you help me with this small EFS problem. I've searched the EFS databases and I can't find anything dealing with current and previous closes. I've modified a built-in EFS for handling RENKO charts but I need the final, if not simple ways to compare the current close with the previous close. Please look at the attached EFS(text format) and see if you can suggest something.
12-10-2005, 06:07 AM
Try pasting this code in...
It should be obvious where it goes.
close() > close(-1)
else if (
close() < close(-1)
12-10-2005, 06:08 AM
Sorry, don't have any code that works with orderid or strategyid at this time, if I do I will paste it in here.