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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        65 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        35 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        51 views
        0 likes
        Last Post CarlTrading  
        Working...
        X