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 ct, Today, 04:16 AM
    1 response
    1 view
    0 likes
    Last Post ct
    by ct
     
    Started by aeadon, Today, 02:27 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by op1031, Today, 01:52 AM
    0 responses
    1 view
    0 likes
    Last Post op1031
    by op1031
     
    Started by Aramunno, Yesterday, 10:11 PM
    2 responses
    18 views
    0 likes
    Last Post Aramunno  
    Started by sdauteuil, Yesterday, 09:38 PM
    0 responses
    6 views
    0 likes
    Last Post sdauteuil  
    Working...
    X