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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        656 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        371 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        579 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X