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 Aviram Y, Today, 05:29 AM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by algospoke, 04-17-2024, 06:40 PM
    3 responses
    26 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by bmartz, 03-12-2024, 06:12 AM
    3 responses
    30 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by gentlebenthebear, Today, 01:30 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by cls71, Today, 04:45 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X