Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Invalid arguments in DrawRegion

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

    Invalid arguments in DrawRegion

    I think the problem is that I'm using two horizontal lines instead of data series. If that is the problem, how do I correct it. If that isn't the problem, any suggestions would be appreciated:

    DrawRegion("region" + j.ToString(), 20, CurrentBar, doublesList[i],doublesList[i+1],Color.Empty,Color.Lime,2);

    The above line is the predicate of an "if" statement. j is an integer that increments on each repetition.
    Last edited by sgordet; 06-16-2011, 09:35 PM.

    #2
    sgordet, you're correct - you could not use 2 doubles, one has to be a series :

    Comment


      #3
      I have a list of doubles where each item of the list represents a horizontal line. Can you point me to where I can how to convert that list into a list of data series?
      Or is there a better way to do this than using DrawRegion: I want to shade the regions bounded by horizontal lines that are less than a certain distance apart.

      Comment


        #4
        I think a region would be the right approach, you need to store the doubles in a custom series with the .Set method the DataSeries objects would offer.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        42 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        25 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        162 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        157 views
        2 likes
        Last Post CaptainJack  
        Working...
        X