Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 :

    BertrandNinjaTrader Customer Service

    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.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        59 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Today, 06:52 PM
        4 responses
        36 views
        0 likes
        Last Post ScottWalsh  
        Started by olisav57, Today, 07:39 PM
        0 responses
        7 views
        0 likes
        Last Post olisav57  
        Started by trilliantrader, Today, 03:01 PM
        2 responses
        21 views
        0 likes
        Last Post helpwanted  
        Started by cre8able, Today, 07:24 PM
        0 responses
        10 views
        0 likes
        Last Post cre8able  
        Working...
        X