Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CrossUnder Argument problem

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

    CrossUnder Argument problem

    i want to test SpanRSI for CrossBelow a trigger value. SpanRSI is Series<double>. SpanTrigger is double. The conditional statement below produces an error.

    if (CrossBelow(SpanRSI[0], SpanTrigger, 1) )
    {
    Print(string.Format("CurrentBar {0} SpanRSI[1] {1:0} SpanRSI[0] {2:0} ", CurrentBar, SpanRSI[1], SpanRSI[0] ));
    }

    errors 1. overload method match for CrossBelow has invalid arguments
    2. Argument 2 can not convert from double to ISeries<double>

    The help manual specifies that an ISeries<double> is required as
    CrossBelow(ISeries<double>series1,doublevalue,intlookBackPeriod)

    What can be done to take a variable i create and subject it to CrossBelow? Thanks!

    #2
    Hello Kicks.Spin,

    Thanks for your post.

    You have a correct understanding from the help guide in that one of the two arguments needs to be a series. In both instances, you have a double value.

    If SpanRSI is a series then SpanRSI[0] would be the current bar value (a double value) of that series.

    Try: if (CrossBelow(SpanRSI, SpanTrigger, 1) )

    Comment


      #3
      Thanks Paul. Works great. Makes sense the method would need all series values to make a crossunder comparison some n number or bars back.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      579 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X