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

Multiple plots on indicator

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

    Multiple plots on indicator

    I am trying to create multiple plots on a new indicator.

    When I have a single plot, like:
    AddPlot(new Stroke(Brushes.Orange, 2), PlotStyle.Block, "MainPlot");

    I simply assign a value to Value[0] and everything works.

    Now if I have more than one plot like above on my indicator, what do I assign to? Does it become:
    Value[0,0]
    Value[0,1]??

    Please help. I could not find examples.

    #2
    Sorry, I found an answer already I should have read AddPlot() docs



    Values[0][0] = Median[0]; // Blue "Plot A"
    Values[1][0] = Low[0]; // Red "Plot B"
    Values[2][0] = High[0]; // Green "Plot C"
    Last edited by stevenev1; 02-25-2017, 10:48 AM.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Stanfillirenfro, Today, 07:23 AM
    3 responses
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by FitSpressoHonest, Today, 09:14 AM
    0 responses
    1 view
    0 likes
    Last Post FitSpressoHonest  
    Started by Davide999, 05-18-2023, 03:55 AM
    4 responses
    557 views
    1 like
    Last Post kcwasher  
    Started by rexsole, Today, 08:39 AM
    2 responses
    7 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by cmtjoancolmenero, Yesterday, 03:58 PM
    6 responses
    29 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X