Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Region question in nt7

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

    Draw Region question in nt7

    I am confused with the statement below as I get a compile error "Argument '4' cannot convert from 'double' to 'NinjaTRader.Data.IDataSeries'"


    Code:
    foreach (double i in list)
    {
    DrawRegion("region"+CurrentBar,CurrentBar,0, High[0], i, Color.Empty, Color.red, 2);
    }

    #2
    Hello Nick123,

    Thank you for your post.

    The compile error message you are receiving means that you are passing a double object into argument 4 of the DrawRegion method when a Series object should be used. Instead of using High[0] for argument 4, you would need to use High. For example:

    Code:
    foreach (double i in list)
    {
        DrawRegion("region"+CurrentBar,CurrentBar,0, High, i, Color.Empty, Color.Red, 2);
    }
    See the help guide documentation below for more information.
    DrawRegion - https://ninjatrader.com/support/help...drawregion.htm

    Let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by fredNT13, Yesterday, 06:40 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by sidlercom80, Today, 12:57 AM
    0 responses
    3 views
    0 likes
    Last Post sidlercom80  
    Started by gbajaj, Yesterday, 11:16 PM
    0 responses
    1 view
    0 likes
    Last Post gbajaj
    by gbajaj
     
    Started by PWillard, Yesterday, 10:30 PM
    0 responses
    1 view
    0 likes
    Last Post PWillard  
    Started by waldoalvarez, 06-19-2021, 05:50 AM
    2 responses
    16 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X