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 gentlebenthebear, Today, 01:30 AM
        2 responses
        13 views
        0 likes
        Last Post gentlebenthebear  
        Started by Kaledus, Today, 01:29 PM
        2 responses
        7 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by frankthearm, Yesterday, 09:08 AM
        13 responses
        45 views
        0 likes
        Last Post frankthearm  
        Started by PaulMohn, Today, 12:36 PM
        2 responses
        16 views
        0 likes
        Last Post PaulMohn  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        2 responses
        56 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Working...
        X