Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CrossAbove Not Compiling

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

    CrossAbove Not Compiling

    I am trying to check to see if the current/last price has crossed over the high of the previous candle with the following line

    Code:
    CrossAbove(Close[0],High[1],0)
    I get the following error CS1502 The best overloaded method match for CrossAbove(double,ISeries<double>,int) has some invalid arguments
    but when I hover over Close[0] it shows as a ISeries<double> but the method is reading it as a double.

    I am using with Calculate.OnPriceChange

    What is the issue here?

    #2
    Hello proptradingshop,
    Close[0] is a double, for this to work you need to use Close which is a double series.
    Code:
    CrossAbove(Close,High[1],1);
    Hope it helps!

    Comment


      #3
      Hello proptradingshop,

      s.kinra is correct you just need to drop the BarsAgo and pass the Close series directly.

      You can find additional samples and information on the CrossAbove method here: https://ninjatrader.com/support/help...sub=CrossAbove

      I look forward to being of further assistance.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      71 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      143 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      76 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      47 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      51 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X