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 lightsun47, Today, 03:51 PM
          0 responses
          5 views
          0 likes
          Last Post lightsun47  
          Started by 00nevest, Today, 02:27 PM
          1 response
          10 views
          0 likes
          Last Post 00nevest  
          Started by futtrader, 04-21-2024, 01:50 AM
          4 responses
          46 views
          0 likes
          Last Post futtrader  
          Started by Option Whisperer, Today, 09:55 AM
          1 response
          14 views
          0 likes
          Last Post bltdavid  
          Started by port119, Today, 02:43 PM
          0 responses
          10 views
          0 likes
          Last Post port119
          by port119
           
          Working...
          X