Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Exposing an indicator variable ,that is not a plot

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

    Exposing an indicator variable ,that is not a plot

    Hello All,

    I am working on learning ninjascript and the following is what I am attempting. I want to access the value of an indicator in another indicator or strategy. I found the following
    sample which was very helpful

    SampleBoolSeries_NT8.zip (5.3 KB, 1002 views)


    I added this code to my indicator and it compiles without error and I believe I now have an exposed variable called BearIndication. I am now trying to access the exposed value from within another indicator (strategy) and I am not sure how to do this.
    If you look at the example (see link) it will make things more clear. Appreciate any help here as I attempt to learn this.

    Mark

    #2
    Hello markbb10,

    Are you specifically wanting a bool series and not a Plot?

    It would be called as a property of your indicator.

    private BearIndication myBear;

    // in OnStateChange()
    else if (State == State.DataLoaded)
    {
    myBear = BearIndication();
    }

    // in OnBarUpdate
    Print(myBear.MyBoolSeries[0]);
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you Chelsea, much appreciated

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by trilliantrader, 04-18-2024, 08:16 AM
      4 responses
      18 views
      0 likes
      Last Post trilliantrader  
      Started by mgco4you, Today, 09:46 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by wzgy0920, Today, 09:53 PM
      0 responses
      9 views
      0 likes
      Last Post wzgy0920  
      Started by Rapine Heihei, Today, 08:19 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 08:25 PM
      0 responses
      10 views
      0 likes
      Last Post Rapine Heihei  
      Working...
      X