• 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

Indicator won't give data to another indicator

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

    Indicator won't give data to another indicator

    Hello, I've embedded a RegressionChannel indicator within another indicator and when I try to read its values all I get is 0.

    Adding the indicator code in Initialize with RegressionChannel IndRC; defined just after the class declartion:
    IndRC = RegressionChannel(25,1);

    Code to read the indicator in OnBarUpdate
    if(Close[0] > IndRC.Middle[0]) do something

    I'm baffled. I've done this lots of times and when I try other indicators they all work, but the one I want; RegressionChannel, won't report anything but 0.

    Thanks for the help.
    daqu40
    NinjaTrader Ecosystem Vendor - QTradez

    #2
    Hello daqu40,

    Thank you for writing in.

    Please move...
    Code:
    IndRC = RegressionChannel(25, 1);
    ...from the Initialize() method to the OnStartUp() method and see if you experience the same.

    If you already do not have OnStartUp() in your script, you will just need to manually add the method into your script: http://ninjatrader.com/support/helpG...?onstartup.htm
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      That did it.

      Thanks Zach!
      daqu40
      NinjaTrader Ecosystem Vendor - QTradez

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Vincere, Today, 01:59 AM
      0 responses
      2 views
      0 likes
      Last Post Vincere
      by Vincere
       
      Started by Davoone1, Yesterday, 07:28 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Started by Bobisam, Yesterday, 10:53 PM
      1 response
      6 views
      0 likes
      Last Post Bobisam
      by Bobisam
       
      Started by quantera, Yesterday, 05:38 PM
      0 responses
      5 views
      0 likes
      Last Post quantera  
      Started by ciro1963, Yesterday, 03:58 PM
      0 responses
      6 views
      0 likes
      Last Post ciro1963  
      Working...
      X