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 burtoninlondon, Today, 12:38 AM
          0 responses
          5 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          14 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          11 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Yesterday, 07:51 PM
          0 responses
          13 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,983 views
          3 likes
          Last Post jhudas88  
          Working...
          X