Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Refernce Plot Width and line attributes

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

    Refernce Plot Width and line attributes

    Scenario:
    I draw rays but want to add a plot so the user can define his plot with and line attributes.

    Question
    How do I retrieve/reference these plot values for my draw ray? I can set the values with "Plots[0].Pen.Width" but what is the syntax to reference them?

    Cheers

    #2
    Hello ct,

    Thanks for your post.

    If your end goal is to obtain the users preferences for line width and line style and plot style, you can use properties to allow the user to select them and then can work with the variables in your code.

    For example, to get a line width:

    [Description("Width for MA plot.")]
    [Category("3. MA Plot")]
    [Gui.Design.DisplayNameAttribute("3.Line Width MA")]
    public int Plot0Width
    {
    get { return plot0Width; }
    set { plot0Width = Math.Max(1, value); }
    }


    To get the plot style:

    [Description("PlotStyle for MA plot.")]
    [Category("3. MA Plot")]
    [Gui.Design.DisplayNameAttribute("1.Plot Style MA")]
    public PlotStyle Plot0Style
    {
    get { return plot0Style; }
    set { plot0Style = value; }
    }


    To get the dashstyle:

    [Description("DashStyle for MA plot.")]
    [Category("3. MA Plot")]
    [Gui.Design.DisplayNameAttribute("2.Dash Style")]
    public DashStyle Dash0Style
    {
    get { return dash0Style; }
    set { dash0Style = value; }
    }
    Attached Files
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by trilliantrader, 04-18-2024, 08:16 AM
    7 responses
    27 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by samish18, 04-17-2024, 08:57 AM
    17 responses
    64 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by rocketman7, Today, 02:12 AM
    2 responses
    17 views
    0 likes
    Last Post rocketman7  
    Started by briansaul, Today, 05:31 AM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by PaulMohn, Today, 03:49 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X