Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Open Window from Indicator or Strategy

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

    Open Window from Indicator or Strategy

    Hello,
    I have been trying to get the example to work for SetIndicatorValueFromAddonWindowExample_NT8.zip
    Which is in the V8 beta thread here:

    https://forum.ninjatrader.com/forum/historical-beta-archive/version-8-beta/85215-open-window-from-strategy?_gl=1*1et8416*_gcl_aw*R0NMLjE3MjU0MzczMjQ uQ2owS0NRandpdUMyQmhEU0FSSXNBTE9WZkJKd25vZFdmQnRTQ TA2MW9Fdk0zdjRtQlA4RVBxZ09EaUtoNndPSlR2MlVEQnJ1THV oal81TWFBc2lMRUFMd193Y0I.*_gcl_au*MTIyMjc1NjE2Ny4x NzI0NzcyMjE2LjEzMTI2ODE1NzMuMTcyNjM0NzI2Ni4xNzI2Mz Q3MjY2#post759830

    I am able to import the AddOn and create an instance of it in a sample indicator (RogersHiLowAlerts), but when trying to assign the AddOn to the indicator I get "cannot convert type" errors. I have tried to explicitly convert it with the class name. I am obviously missing something.

    I have included this using statement in my indicator:
    using NinjaTrader.NinjaScript.AddOns;

    and the relevant code is here:

    Code:
    SetIndicatorValueFromAddonWindowExampleToolsWindow myAddon = new SetIndicatorValueFromAddonWindowExampleToolsWindow ();
    
    protected override void OnBarUpdate()
    {
    if (CurrentBar == 1) myAddon = (NinjaTrader.NinjaScript.AddOns.SetIndicatorValueF romAddonWindowExampleToolsWindow)this;


    The specific error I get with on the "myAddon =" assignment line is:
    Cannot convert type 'NinjaTrader.NinjaScript.Indicators.RogersHiLowAle rts' to NinjaTrader.NinjaScript.AddOns.SetIndicatorValueFr omAddonWindowExampleToolsWindow'

    I assume that when fixed, this concept will also work with a strategy.

    What am I missing? Or is there a better way?

    I am using NinjaTrader 8.1.3.1 64-bit

    Thanks for any help or guidance you can give!

    #2
    Hello RogBear,

    The SetIndicatorValueFromAddonWindowExampleToolsWindow references the indicator class SetIndicatorValueFromAddonWindowExample on line 23.

    public Indicators.SetIndicatorValueFromAddonWindowExample TargetIndicator;

    You would want to reference your indicator class instead.

    Yes, this would work from a strategy, a drawing tool, or another addon.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I hadn't noticed that you included a sample indicator with the AddOn, which shows how they work together. I see now. Thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      559 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      546 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X