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

Custom Chart trader behavior and controls

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

    Custom Chart trader behavior and controls

    Hi,

    I've been tinkering around with an add-on to modify the behavior of chart trader buttons. Using the add-on samples as guides, I've been able to identify and augment the button behaviors. I've added a checkbox control as well.

    I am still quite confused though about the underlying structure of the chart trader controls. There seem to be different instances of the instrument selector, qty selector, account selector, etc unique to each chart vs the chart trader buttons which seem to be shared across all charts (or at least I can be modify them at a level that causes them to be rendered and function the same across all charts). Can you explain at a high level the model or framework that enables these two parts of the chart trader controls to function differently?

    My ultimate goal being to create a checkbox control on chart trader that functions independently per chart. So if there is something to know beyond the scope of my first question to get that working, please lmk.

    Thanks,
    Nick

    #2
    Hello NickyD,

    From the description it sounds like you used an addon to use the OnWindowCreated override to modify windows. If that is what you have done then that modification would happen as each window opened so your code would be executed the same for each window.

    You can use that approach to add a checkbox to each window however I am not sure what the use case is to be able to say if that's the right way to add the control. It would depend on what you need that checkbox to do. If you can provide some details on what the overall goal is with the checkbox that would help to better guide how to add it/use it.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Before I delve into the use cases, I could use some clarification. Did the Qty Selector, Account selector or ATM selector ever work independently per tab or have I somehow broken my UI? I would have sworn that it was possible to have one chart trader set to QTY 3 ATM Strategy #1 on a NQ chart and a second tab set to QTY 5 ATM Strategy #2 on an ES chart. But now the only thing that works independently is the instrument selector and the bid/ask price text boxes. When I switch back and forth between tabs of the same window, the selections of one chart trader gets propagated to the other.


      Comment


        #4
        Hello NickyD,

        Each chart trader will work independently for the series that its tied to in the chart along with the account that's selected. If you are unsure if the UI is currently not working correctly I would suggest to exclude your addon from compilation in the editor and then restart the platform to clear any changes.

        From what you described it does sound like you have introduced a problem as the different instruments should have unique chart traders in separate charts.

        JesseNinjaTrader Customer Service

        Comment


          #5
          OK, thanks. Let me try to revert back to some more stable state before proceeding.

          Comment


            #6
            NinjaTrader_Jesse It seems I've caused some damage here. I've excluded all Add-Ons from compiling as well as any indicators that modified ChartTrader but my chart traders are still not working independently of each other when there's multiple tabs open. Different windows are ok, but not tabs.

            I've restarted a dozen times, created a new workspace from scratch, with new charts and various instruments, still not working. Is the fastest way to fix this going to be to uninstall and reinstall NT?

            Comment


              #7
              Hello NickyD,

              When you change tabs is the instrument selector in the chart trader changing to the given instrument in the chart?

              Are any of your addons other modifications still showing up to know if that is still running or not? After excluding please ensure to compile from a system indicator like the ADL.

              If you are still having problems it may be a reasonable step to try a clean user folder test. That essentially just involves shutting down the platform, rename the documents/NinjaTrader 8 to something else like NinjaTrader 8.Old. Then re install the platform using the windows add remove programs menu or the installer. That generates a new empty user folder which you can test with, if the problem resolves you can continue using that folder otherwise if its still having difficulties a complete uninstall re install would be next.




              JesseNinjaTrader Customer Service

              Comment


                #8
                So, amongst your other suggestions, I've uninstalled NT, renamed the user folder, rebooted, and re-installed NT and it seems like it's still happening...

                I made a screen recording, can you look at this and lmk what you think. The built in player in my browser lowers the quality a lot, but the recording is in HD if you download it and play it locally. I didn't show it because I couldn't blur the account info but the account selector doesn't maintain state across tabs either.

                https://www.dropbox.com/s/8i2v2otxlq...rader.mp4?dl=0

                Thanks
                Nick
                Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!
                Last edited by NickyD; 03-08-2022, 03:12 PM.

                Comment


                  #9
                  Hello NickyD,

                  I believe what you are showing is correct, only the instrument should change when changing tabs. The chart trader otherwise would leave the settings you last used in it because you are not changing to a totally different window with a different chart trader.

                  JesseNinjaTrader Customer Service

                  Comment


                    #10
                    Ok, so I think you're saying that the lesson here is that it's all one chart trader in my video. Chart trader exists only at the window level and not the tab or chart level. And the ATM selector and buy/sell buttons on both tabs are in fact the same controls from the same chart trader that are just drawn twice in two different places.

                    If I opened a second window, that would be a second instance of chart trader? And conceivably there is a way to modify this chart trader separately from the first because it's actually a separate instance?

                    What is the proper way to think about this?

                    Comment


                      #11
                      Hello NickyD,

                      Right the chart trader is part of the overall window and doesn't change with the tabs. The way to modify individual chart trader controls would be to use an addon and the OnWindowCreated override to monitor new windows to insert your changes. The alternative would be to apply an indicator to the specific chart you wanted to modify and then use that indicators ChartControl to find the parent window.

                      JesseNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by mattbsea, Today, 05:44 PM
                      0 responses
                      3 views
                      0 likes
                      Last Post mattbsea  
                      Started by RideMe, 04-07-2024, 04:54 PM
                      6 responses
                      31 views
                      0 likes
                      Last Post RideMe
                      by RideMe
                       
                      Started by tkaboris, Today, 05:13 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post tkaboris  
                      Started by GussJ, 03-04-2020, 03:11 PM
                      16 responses
                      3,282 views
                      0 likes
                      Last Post Leafcutter  
                      Started by WHICKED, Today, 12:45 PM
                      2 responses
                      20 views
                      0 likes
                      Last Post WHICKED
                      by WHICKED
                       
                      Working...
                      X