• 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 zacharydw00, Today, 10:19 PM
      0 responses
      2 views
      0 likes
      Last Post zacharydw00  
      Started by chafan11, Today, 09:28 PM
      0 responses
      5 views
      0 likes
      Last Post chafan11  
      Started by GreenspanAlec, Today, 05:32 PM
      0 responses
      7 views
      0 likes
      Last Post GreenspanAlec  
      Started by mrwarkhan, Today, 03:45 PM
      0 responses
      15 views
      0 likes
      Last Post mrwarkhan  
      Started by momchi, Yesterday, 10:09 PM
      3 responses
      12 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Working...
      X