Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Newbie problem with referencing indicator in strategy

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

    Newbie problem with referencing indicator in strategy

    Sorry, I cant seem to find this in the docs.

    I have an indicator Ind1 that exposes a DataSeries tradesignals

    How do I reference that DataSeries in a strategy?

    I try the obvious:

    if (Ind1.tradesignals == 1)
    ....

    but it's not right.

    Thanks in advance!

    #2
    A correct call should be:

    double signal = Ind1(parameters if any...).tradesignals[0];

    if (signal > 0) {
    // do your stuff here
    }
    Cheers,
    Pi
    Last edited by ninZa; 01-03-2015, 07:27 AM.
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    Comment


      #3
      Thanks Pi. Now I have it instantiated correctly.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      647 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      367 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      571 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X