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 buttons within the ChartTrader disappear.

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

    Custom buttons within the ChartTrader disappear.

    I am working on a strategy in which custom buttons are added to the ChartTrader. Three rows, two buttons per row.
    In some cases, suddenly the buttons from the first and second rows disappear, while those from the third row remain, and the strategy continues to function.
    I can't find a pattern or anything similar as to why this happens. Perhaps as an additional piece of information, there are many charts open with the same strategy on different instruments, timeframes, and accounts, and this occurs with real accounts.
    And in some accounts, the buttons disappear, while in others, they do not.
    Could you please suggest how I can avoid this?
    Thank you.

    #2
    Hello ervin,

    Thanks for your post.

    I suggest adding debugging your script by reducing code and adding prints to your script to understand exactly how the logic in your script is behaving to identify what exact line of code is causing the behavior to occur.

    Below is a link to a forum post that demonstrates how to use prints to understand behavior.



    You could find a reference sample demonstrating adding custom buttons to chart trader on this help guide page: https://ninjatrader.com/support/help...ui)-modifi.htm
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Thank you Brandon.
      Were do you suggest to put the prints? I mean, I have methods to create, load, unload, unsuscribe, for the buttons, and obviously onbarupdate, and the other methods for the bot logic.

      Comment


        #4
        Hello ervin,

        Thanks for your notes.

        You would need to add prints throughout all of the logic of your script used to custom render buttons to understand exactly how all the logic is evaluating.

        If you are only seeing the behavior occur for certain buttons, you could add prints for the logic of those specific buttons in the script to see how those buttons are behaving.

        To isolate the behavior I suggest testing the script on a single chart window and evaluating the prints in the Output window to see how the logic evaluates when you see the behavior occur.

        For an example of custom rendering buttons on chart trader, see the reference sample linked on post number 2.
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by llanqui, Today, 10:32 AM
        0 responses
        1 view
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by StockTrader88, 03-06-2021, 08:58 AM
        45 responses
        3,992 views
        3 likes
        Last Post johntraderuser2  
        Started by TAJTrades, Today, 09:46 AM
        0 responses
        7 views
        0 likes
        Last Post TAJTrades  
        Started by rhyminkevin, Yesterday, 04:58 PM
        5 responses
        62 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Started by realblubb, Today, 09:28 AM
        0 responses
        8 views
        0 likes
        Last Post realblubb  
        Working...
        X