Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Apply My Indicator Changes from a Popup

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

    Apply My Indicator Changes from a Popup

    Hello, I made a data exporter, by Hours, Daily, Weekly, Monthly, Quarterly, everything works fine for me, but I made a window that I added to the bar so I could have a shortcut and not go to the properties of my Indicator, but I want to know how I apply the changes from my Export button, that is, 1.- If in my properties window of my indicator I have selected the export mode type: Hour and if I go to my window (Step 2) and - I select my export mode, for example Daily and 3.- when clicking on Export my export should be executed in Daily mode, not in Hour mode, and I want that change to be saved, but it does not work for me since in the properties window of the Indicator the Daily Mode that I previously selected actually appears in my pop-up window but the export is still in Hour Mode, my question is when you click on Apply are those changes saved somewhere? and how can I solve my request? thanks

    Click image for larger version

Name:	1.png
Views:	112
Size:	46.0 KB
ID:	1321660


    Click image for larger version

Name:	2.png
Views:	90
Size:	32.2 KB
ID:	1321661

    #2
    Hello icebergdelphi,

    Below is a link to an example of returning a value from a popup addon window back to the originating host.


    If the property in the Indicators window is showing the correct selected value, this would mean the logic within the script may not properly be using that value.

    Add debugging prints to understand the behavior. When the button is clicked, print the computer time and the value of the property. If there are conditions in the click event handler method, print all values in the condition with labels for each value and comparison operator.

    Below is a link to a support article on adding debugging prints to understand behavior.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello icebergdelphi,

      Below is a link to an example of returning a value from a popup addon window back to the originating host.


      If the property in the Indicators window is showing the correct selected value, this would mean the logic within the script may not properly be using that value.

      Add debugging prints to understand the behavior. When the button is clicked, print the computer time and the value of the property. If there are conditions in the click event handler method, print all values in the condition with labels for each value and comparison operator.

      Below is a link to a support article on adding debugging prints to understand behavior.
      https://support.ninjatrader.com/s/ar...nd-TraceOrders
      Thank you, of course I use Print to see what is happening, I had already seen the example you mentioned but it is not very commented to see what each part of the code does, thank you very much I will continue looking for information

      Comment


        #4
        Originally posted by NinjaTrader_ChelseaB View Post
        Hello icebergdelphi,

        Below is a link to an example of returning a value from a popup addon window back to the originating host.


        If the property in the Indicators window is showing the correct selected value, this would mean the logic within the script may not properly be using that value.

        Add debugging prints to understand the behavior. When the button is clicked, print the computer time and the value of the property. If there are conditions in the click event handler method, print all values in the condition with labels for each value and comparison operator.

        Below is a link to a support article on adding debugging prints to understand behavior.
        https://support.ninjatrader.com/s/ar...nd-TraceOrders
        Hello Again @NinjaTrader_ChelseaB​ I think my question is how can I save the changes I selected in my combobox that is inside my custom window? I mean, when you go to the indicator properties and click Apply, is that what I want to do? Are the changes saved in an XML or somewhere else? Thanks.

        Comment


          #5
          Hello icebergdelphi,

          The addon window sets the indicator variables InstrumentValue, IntValue, and StringValue on lines 98 to 106.
          In the indicator these variables are using the XmlIgnore() attribute to prevent these from being saved.
          Remove the XmlIgnore attribute from the int and string variables, for these to be saved in xml, and serialize the instrument for this to be saved.

          Code:
          [XmlIgnore]
          [TypeConverter(typeof(NinjaTrader.Gui.Tools.InstrumentSelector))]
          public Instrument InstrumentInput
          { get; set; }
          
          [Browsable(false)]
          public string InstrumentInputSerialize
          {
          get { return InstrumentInput.FullName; }
          set { InstrumentInput = Instrument.GetInstrument(value); }
          }
          ​
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          558 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
          545 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