Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

global variable on Draw.Line and template name

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

    global variable on Draw.Line and template name

    Is there a way to have an internal template in order to use the parameters, This is my line statement.

    Draw.Line(this, "ALOW", false, tAStartTime, dALow, Time[0], dALow, eBox1Color, eBox1LineStyle, nBox1LineWidth);

    eBox1Color, eBox1LineStyle, nBox1LineWidth are the paremeters I want to use but The function allows a template name

    Draw.Line(NinjaScriptBase owner, string tag, bool isAutoScale, DateTime startTime, double startY, DateTime endTime, double endY, bool isGlobal, string templateName)


    This is the statement I am currently using. What I want to do is
    Draw.Line(NinjaScriptBase owner, string tag, bool isAutoScale, DateTime startTime, double startY, DateTime endTime, double endY, Brush brush, DashStyleHelper dashStyle, int width)


    create an internal template of these parameters and make an internal template

    Brush brush, DashStyleHelper dashStyle, int width

    I allow the user to change the line color dash style and width.

    #2
    Hi ballboy11, thanks for your question.

    The drawing tool templates are meant to be edited through the user interface on a chart. So you set up the drawing tool how you like it then you save a template of that drawing object. The template name is then used in the "string templateName" parameter. A developer could have a user input string that asks for a template name to use for the templateName.

    Please let me know if this does not resolve your inquiry.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    82 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    43 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    56 views
    0 likes
    Last Post CarlTrading  
    Working...
    X