Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Placement in OnMarketData?

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

    Order Placement in OnMarketData?

    Hello,

    I've been developing a strategy with Unmanaged = true and initial entry orders being placed in the OnBarUpdate section.

    I saw this section in the help guide:http://www.ninjatrader.com/support/h...marketdata.htm

    I'm doing test prints inside OnMarketData and OnBarUpdate to see the differences of the data stream to the output window. I'm using an exposed variable from another indicator for the printout. Here's a snapshot of the results where OnMarketData gives 2 times the quantity of OnBarUpdate feedback using COBC = false. I've seen even more (4 or more). I would have thought they would have given similar results.

    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.



    Would the submission of orders work well inside the OnMarketData section?

    If this is okay to use here, are there other "SubmitOrder" considerations related to OnMaketData or OnBarUpdate to keep in mind in my strategy?

    Best Regards,
    Kirk
    Last edited by zeller4; 09-21-2010, 09:57 AM.

    #2
    Hello zeller4,

    The main thing to keep in mind is the conditionals prior to placing these orders. You would want to be careful accessing bar objects outside OnBarUpdate(). The timing of the OMD event is not synced with changes to bar objects.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan for the quick response.

      So, if I have an ExposedVariable from another indicator, could I use that as a trigger?

      ie.
      Code:
       
      triggerprice = ...ExposedVariable;
      if (e.MarketDataType == MarketDataType.Last)
      {
       
      if (e.Price == triggerprice) SubmitOrder(....
       }
      Kirk

      Comment


        #4
        Hi Kirk,

        Yes, you can use exposed variables from another indicator as a trigger in OnMarketData().
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        50 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        16 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        22 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X