Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

immediate entry with COBC=true

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

    immediate entry with COBC=true

    Hello,

    I do not remember how I can get an immediate entry in my script when COBC=true.
    (EG with GetCurrentAsk()>GetCurrentBid() this works with COBC=false)

    Which "condition" always true will enforce an immediate entry, or what other remedy could help to do so?

    Thanks
    Tony

    #2
    Tony, with COBC = true your OnBarUpdate() is called each bar only, so you could work from a finer series that would 'close' / update more often or from an event that would not be tied to the bars formation, like OnMarketData. Do you ask for backtesting or realtime trading?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello Bertrand,

      thank you for your reply. I´m asking for realtime trading.

      Now I do COBC= false and for conditions I need to have close of bar I do with "FirstTickOfBar". But I thought it could go more easily - and less CPU maybe - when doing COBC= true and only for the entry to get it somehow immediately also when COBC= true.

      With your question I anticipate that you´ll have a solution for working this in realtime. Please let me know, as well a sample of OnMarketData if available.


      Thanks
      Tony

      Originally posted by NinjaTrader_Bertrand View Post
      Tony, with COBC = true your OnBarUpdate() is called each bar only, so you could work from a finer series that would 'close' / update more often or from an event that would not be tied to the bars formation, like OnMarketData. Do you ask for backtesting or realtime trading?

      Comment


        #4
        Tony, thanks - wouldn't be aware of another way really - you could look into returning from OnBarUpdate() if the same tick is seen, so some close price for your COBC = false tick by tick processings. So you do not recalculate in this case...

        OnMarketData was an example of a method that is called independent from the bars updates, so if you monitor for example for a specific price intrabar you might be able to move logic here instead of OnBarUpdate() on each tick.

        I would not have a specific example to point you to, but just some thoughts how to further custom develop your scripts if desired.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hello Bertrand,

          thank you for your support.

          But I do not understand what you mean, not with "... you could look into returning..." and not with "OnMarketData....". Sorry. Can you please explain.

          And another idea please, I couldnt find information in the forum: isn´t it possbile to say somehow like "if !=Historical" then the entry should be done immediately even with COBC=true. No?

          Thanks
          Tony

          Originally posted by NinjaTrader_Bertrand View Post
          Tony, thanks - wouldn't be aware of another way really - you could look into returning from OnBarUpdate() if the same tick is seen, so some close price for your COBC = false tick by tick processings. So you do not recalculate in this case...

          OnMarketData was an example of a method that is called independent from the bars updates, so if you monitor for example for a specific price intrabar you might be able to move logic here instead of OnBarUpdate() on each tick.

          I would not have a specific example to point you to, but just some thoughts how to further custom develop your scripts if desired.
          Last edited by tonynt; 03-29-2013, 02:54 AM.

          Comment


            #6
            Tony, in OnBarUpdate() you can store the last seen tick value (Close[0]) when running COBC false and then check at the start if the current tick is equal to the last seen one, in this case your return out of processing OnBarUpdate(). This is something we plan on making available per default in our next major upgrade as option in processing. For OnMarketData(), the idea is - say you have a price level for a trade you want to monitor which you want to execute only if a certain bid / ask volume was seen, this could be directly done in here as OnMarketData() is called independently from OnBarUpdate() and for all Level 1 datastream events, meaning it's not tied to the OnBarUpdate() updating logic.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Mikey_, 03-23-2024, 05:59 PM
            3 responses
            49 views
            0 likes
            Last Post Sam2515
            by Sam2515
             
            Started by f.saeidi, Today, 12:14 PM
            7 responses
            16 views
            0 likes
            Last Post f.saeidi  
            Started by Russ Moreland, Today, 12:54 PM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by philmg, Today, 12:55 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by TradeForge, 04-19-2024, 02:09 AM
            2 responses
            32 views
            0 likes
            Last Post TradeForge  
            Working...
            X