Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

immedieate strategy entry

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

    immedieate strategy entry

    Hello,

    I have set calculateonbarclose = true; because of PC-ressources (when I understand correctly that with false the PC needs a lot more ressources).

    But how can I do then an entry immediately in my script-strategy. I have already eliminated all entry conditions to avoid calculation (onbarclose). But even with the only condition (always true) GetCurrentAsk() > GetCurrentBid()) the entry is done only at close of bar/open next bar.

    How can I have with calculateonbarclose an immediate entry in a NT-script-strategy (as I would do with market order in chart trader?)

    Thank you
    Tony
    Last edited by tonynt; 11-19-2011, 08:02 AM.

    #2
    tonynt,

    The only way to immediately enter orders it to use calculate on bar close = false. You can separate your logic for calculating each bar close, and for calculating each tick by following the example at the following link. This will help save system resources.

    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Thank you!

      Do I understand right and the sample is the exact opposite of what I want to do? In the sample the entry is only at close of bar but the indicators are calculated each tick?

      In my strategy there´s only to calculate for stoploss. Is this correct then to do:

      if (atmStrategyId.Length > 0)
      {

      //if close[0] is 100*TickSize in my direction short//
      if (FirstTickOfBar
      && GetAtmStrategyMarketPosition(atmStrategyId) != MarketPosition.Flat
      && Close[0] < GetAtmStrategyPositionAveragePrice(atmstrategyId) - 100 * TickSize
      )

      AtmStrategyChangeStopTarget(0, DonchianChannel(8).Upper[0], "STOP3", atmStrategyId);

      Thanks
      Tony



      Originally posted by NinjaTrader_AdamP View Post
      tonynt,

      The only way to immediately enter orders it to use calculate on bar close = false. You can separate your logic for calculating each bar close, and for calculating each tick by following the example at the following link. This will help save system resources.

      http://www.ninjatrader.com/support/f...ad.php?t=19387

      Comment


        #4
        tonynt,

        Yes. Essentially you can use the first tick of bar to be your on bar close logic and then otherwise it will be every tick logic.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Thank you!

          When the strategy is running with COBCfalse and in the same chart where the strategy is enabled there are indicators - are the indicators then also COBCfalse? So there should be the stragegy enabled in a chart with no indicators when COBCfalse?

          I think this is an important questin, I couldn´t find an answer about this concern.

          Thanks
          Tony

          Originally posted by NinjaTrader_AdamP View Post
          tonynt,

          Yes. Essentially you can use the first tick of bar to be your on bar close logic and then otherwise it will be every tick logic.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          65 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          41 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          23 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          26 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          52 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X