• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Second indicators plot in strategy

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

    Second indicators plot in strategy

    For example:

    I have >=2 plots in MyIndicator:
    AddPlot(new Stroke(Brushes.Green, 2), PlotStyle.Line, "plt0");
    AddPlot(new Stroke(Brushes.Red, 2), PlotStyle.Line, "plt1");

    In myStrategy i can call "plt0" current value like this:
    MyIndicator(param1, param2,param3)[0]

    Question: How i can call "plt1" current value?

    #2
    Hello nordseven,

    Thanks for your post.

    This line MyIndicator(param1, param2,param3)[0] would be the same as MyIndicator(param1, param2,param3).plt0[0]

    To call the second plot you would use MyIndicator(param1, param2,param3).plt1[0]
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you it works.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ALIENFX, Today, 02:05 AM
      0 responses
      2 views
      0 likes
      Last Post ALIENFX
      by ALIENFX
       
      Started by granitmalreview, Today, 01:07 AM
      0 responses
      5 views
      0 likes
      Last Post granitmalreview  
      Started by cynthia, Today, 12:05 AM
      0 responses
      5 views
      0 likes
      Last Post cynthia
      by cynthia
       
      Started by Jonathan.Lee, Yesterday, 11:42 PM
      1 response
      9 views
      0 likes
      Last Post Jonathan.Lee  
      Started by DTSSTS, Yesterday, 10:14 PM
      0 responses
      3 views
      0 likes
      Last Post DTSSTS
      by DTSSTS
       
      Working...
      X