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

Add (Plot) parameters

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

    Add (Plot) parameters

    How do I find the syntax for all the possible parameters for Add (Plot)? I want to control the dash style, color, plot style, width, etc. in the NinjaScript code.

    The Help guide says: "There are many variations of defined plot and line objects that are not documented. We suggest using the NinjaScript indicator wizard to generate your indicator plot and oscillator lines."

    I used the Wizard but did not see these parameters anywhere. They must be documented somewhere, right?

    Thanks,

    Geoff

    #2
    Add (Plot) parameters

    Hello gdstuart,

    Thanks for writing in to our Support team.

    To view these parameters after creating your plots or lines in the wizard, you will need to unlock your code by selecting the Unlock Code button in the Indicator Wizard window.

    In order to do this, you will want to use the NinjaScript Plot class combined with the C# Pen class to get your desired effect. To view all of the different constructors for the Plot class in you can visit our help guide here:
    http://ninjatrader.com/support/helpG...plot_class.htm

    You can view the constructors for the Pen class here:
    https://msdn.microsoft.com/en-us/lib...(v=vs.90).aspx

    You can view the constructors for the Line class here:
    http://ninjatrader.com/support/helpG...line_class.htm

    Using these constructors will allow you to control the color, plot style, and width of the plot:
    Code:
    // Adds a blue cross style plot with a thickness of 3
    Add(new Plot(new Pen(Color.Blue, 3), PlotStyle.Cross, "myPlot"));
    Please let me know if I may be of any further assistance.
    Alan S.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by JonesJoker, 04-22-2024, 12:23 PM
    8 responses
    41 views
    0 likes
    Last Post JonesJoker  
    Started by timko, Today, 06:45 AM
    0 responses
    3 views
    0 likes
    Last Post timko
    by timko
     
    Started by Waxavi, 04-19-2024, 02:10 AM
    2 responses
    37 views
    0 likes
    Last Post poeds
    by poeds
     
    Started by chbruno, Yesterday, 04:10 PM
    1 response
    44 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Max238, Today, 01:28 AM
    1 response
    25 views
    0 likes
    Last Post CactusMan  
    Working...
    X