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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        61 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        148 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        98 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X