Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CrossAbove() tick vs bar

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

    CrossAbove() tick vs bar

    I am trading 5 minute bars.
    for eg if USD.JPY-IDEALPRO-CASH is 2 minutes into the bar with values open 93.03 and a bar high 93.1 current close value if 93.06. i enter a strategy with crossAbove(C,93.09, 0) it automatically opens the trade.
    i would expect the trade to open after the tick closes above 93.09 after i start the strategy.

    #2
    Hi junkone,

    On which CalculareOnBarClose setting are you running your strategy?

    Please also see this link - http://www.ninjatrader-support.com/H...BarClose1.html

    Comment


      #3
      CalculateOnBarClose = false; is the setting i have on initialize. however i would like to ensure that you understood my point correctly.

      1. i dont want to wait till bar close before it acts on the cross over
      2. i would expect NT to act on the ticks after the strategy has been started and not the ticks before the strategy had been started even though they are part of the same bar.

      Comment


        #4
        1. If you don't want to wait your setting of CalculateOnBarClose = false will do it.

        2. All strategies always run on all data on the chart. If you do not wish this you need to add yourself a condition at the top of your OnBarUpdate() method.
        Code:
        if (Historical)
             return;
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        61 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        149 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        99 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X