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 jeronymite, 04-12-2024, 04:26 PM
          3 responses
          40 views
          0 likes
          Last Post jeronymite  
          Started by bill2023, Today, 08:51 AM
          2 responses
          15 views
          0 likes
          Last Post bill2023  
          Started by sidlercom80, 10-28-2023, 08:49 AM
          167 responses
          2,260 views
          0 likes
          Last Post jeronymite  
          Started by warreng86, 11-10-2020, 02:04 PM
          7 responses
          1,362 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by Perr0Grande, Today, 08:16 PM
          0 responses
          5 views
          0 likes
          Last Post Perr0Grande  
          Working...
          X