Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simulation environment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ScottB
    replied
    Brett,

    Thanks for getting back to me on this. I was trying to simulate a co-located server where we have literally sub millisecond communication latency. I take it, those values are more to simulated high latency rather than low latency.

    I realize one can only get so close in simulation, even with a live data feed.

    Best Regards,
    Scott Boulette

    Leave a comment:


  • NinjaTrader_Brett
    replied
    Scott,

    Thanks for the note.

    You really cannot time orders in OnBarUpdate() for various reasons.

    As this is not the true time it took for order to execute as there is added processing time in there from NinjaTrader calc as well. However this is more of a mention then what is affecting you directly as you reported.

    The simulator is essentially provided as is, if you set the simulation value to a very high number you should see a very long time in order fill. It may also simulate order fill processing in a different way then it would live as well and is something we do not support as far as exact timing of orders.

    The simulator will not give you exact granularity, however if you set this value to a very large value you then should see a very large difference in time delay.

    Let me know if I can be of further assistance.

    Leave a comment:


  • ScottB
    started a topic Simulation environment

    Simulation environment

    Hi,

    I am writing an application that is latency sensitive. We are running it on a co-located server with a Zen-Fire direct feed.

    While testing I came across a situation with a cancel/replace (change order) acknowledgement took 20 milliseconds as per the trace file. I have the comm delay set = 1 and would have thought that was the number I would get.

    As you can see by the information below, that was not the case. Any information provided will be greatly appreciated.

    Best Regards,
    Scott

    -------> Order is at its original price 1182.25
    [FONT='courier new', monospace]2011-10-11 08:44:22:365 (Zen-Fire Direct) Cbi.OrderStatusEventArgs.Process: Order='2e4b298121b446e38b77eedb10e0139e/Sim101' Name='BL_ES_1' New state=Working Instrument='ES 12-11' Action=Buy Limit price=1183.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''[/FONT]




    -------> Change requested to new price 1183.00

    [FONT='courier new', monospace]2011-10-11 08:44:39:787 (Zen-Fire Direct) Cbi.Order.Change: Order='2e4b298121b446e38b77eedb10e0139e/Sim101' Name='BL_ES_1' State=Working Instrument='ES 12-11' Action=Buy Limit price=1183 Stop price=0 Quantity=1 Strategy='BombardierQ' Type=Limit Tif=Day Oco='' Filled=0 Fill price=0 Token='2e4b298121b446e38b77eedb10e0139e' Gtd='12/1/2099 12:00:00 AM'[/FONT]


    -------> Order is being processed by NT is marked pending change.


    [FONT='courier new', monospace]2011-10-11 08:44:39:787 (Zen-Fire Direct) Cbi.Connection.ProcessEventArgs.OrderStatusEventAr gs: Order='2e4b298121b446e38b77eedb10e0139e/Sim101' Name='BL_ES_1' New state=PendingChange Instrument='ES 12-11' Action=Buy Limit price=1183 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''[/FONT]


    -------> The state change is begin communicated to the OnOrderUpdate callback.


    [FONT='courier new', monospace]2011-10-11 08:44:39:787 (Zen-Fire Direct) Cbi.Order.Update1: oldid='2e4b298121b446e38b77eedb10e0139e' Order='2e4b298121b446e38b77eedb10e0139e/Sim101' Name='BL_ES_1' New state=PendingChange Instrument='ES 12-11' Action=Buy Limit price=1183 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''[/FONT]


    -------> The state change is being processed by NT (assuming that the sim engine).


    [FONT='courier new', monospace]2011-10-11 08:44:39:787 (Zen-Fire Direct) Cbi.OrderStatusEventArgs.Process: Order='2e4b298121b446e38b77eedb10e0139e/Sim101' Name='BL_ES_1' New state=PendingChange Instrument='ES 12-11' Action=Buy Limit price=1183 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''[/FONT]


    -------> The change was accepted by the sim exchange, but wait, it took how long? 807 - 787 = 20 msec, not how the simulator is set and decidedly not good.


    [FONT='courier new', monospace]2011-10-11 08:44:39:802 (Zen-Fire Direct) Cbi.Connection.ProcessEventArgs.OrderStatusEventAr gs: Order='2e4b298121b446e38b77eedb10e0139e/Sim101' Name='BL_ES_1' New state=AcceptedInstrument='ES 12-11' Action=Buy Limit price=1183 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''[/FONT]


    -------> Same millisecond the change is being communicated to the caller's OnOrderUpdate
    [FONT='courier new', monospace]2011-10-11 08:44:39:802 (Zen-Fire Direct) Cbi.Order.Update1: oldid='2e4b298121b446e38b77eedb10e0139e' Order='2e4b298121b446e38b77eedb10e0139e/Sim101' Name='BL_ES_1' New state=Accepted Instrument='ES 12-11' Action=Buy Limit price=1183 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''[/FONT]


Latest Posts

Collapse

Topics Statistics Last Post
Started by javier.filgueira, Today, 03:07 PM
0 responses
32 views
0 likes
Last Post javier.filgueira  
Started by cassb, Today, 03:09 PM
0 responses
28 views
0 likes
Last Post cassb
by cassb
 
Started by ChasK, Today, 10:03 AM
3 responses
44 views
0 likes
Last Post Lancer
by Lancer
 
Started by UltraNIX, Today, 01:07 PM
3 responses
38 views
0 likes
Last Post NinjaTrader_ChrisL  
Started by reks13, Today, 11:14 AM
1 response
36 views
0 likes
Last Post NinjaTrader_PaulH  
Working...
X