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 GLFX005, Today, 03:23 AM
    0 responses
    1 view
    0 likes
    Last Post GLFX005
    by GLFX005
     
    Started by XXtrader, Yesterday, 11:30 PM
    2 responses
    11 views
    0 likes
    Last Post XXtrader  
    Started by Waxavi, Today, 02:10 AM
    0 responses
    6 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Started by TradeForge, Today, 02:09 AM
    0 responses
    14 views
    0 likes
    Last Post TradeForge  
    Started by Waxavi, Today, 02:00 AM
    0 responses
    3 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Working...
    X