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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      47 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      22 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      15 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      21 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      23 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X