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

Accessing Chart Trader's Visuals

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

    Accessing Chart Trader's Visuals

    Based on what I've read in some other user requests I think this is a feature request that's not been implemented but I wanted to double check.

    Is it possible to gain access to the same visual lines object that chart trader plots on the chart?

    For example, if I create an indicator or AddOn and I want to display a line on the chart that looks and acts like these markers, is there any way to pull this information from NT?

    The ideal situation would be to end up with a select-able line that drags and looks the same as chart trader's lines.

    As is currently I can only think to create a custom drawobject with custom rendering to simulate the same look, but the dragging wouldn't be quite the same. If this is the only route to take, is it possible to have a draw object plot price markers? Or would I have to do some tedious work with plots to get price markers?

    #2
    Hello HandsFreeTrader,

    Thank you for the post.

    As far as I am aware you are correct and there is currently not a way to access the specific line objects that are displayed by the chart trader internally. However, if you are using an Addon or Indicator, these lines should show up if the user is using a chart with the chart trader open and the same account selected.

    Are you trying to get around having the chart trader open/hidden-open or was there some other case you are seeing where the orders are not displayed? It would not be suggested to try and recreate this logic specifically because this uses a price marker and also special mouse selection. This would very likely be difficult to recreate without a lot of testing. With that being said, if you can give a description of what goal you want to complete I could further review that to see what could be done.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Are you trying to get around having the chart trader open/hidden-open or was there some other case you are seeing where the orders are not displayed?
      .
      In a very general nutshell I'm creating my own version of chart trader that's designed to work with a specific indicator. The chart trader order functionality that's built into NT isn't robust enough for my needs so I'm creating my own.

      It would be nice if I could pull those objects without recreating all of it, but I'm not seeing a way around this.

      Comment


        #4
        Hello HandsFreeTrader,

        In this case is it not possible to utilize the existing ChartTrader so you do not need to recreate the whole control and its logic?

        I wouldnt suggest trying to recreate the ChartTrader because it's already there and built out, I would suggest trying modifying the existing control to add the functionality you want.

        We have samples demonstrating adding to the existing chart trader here: https://ninjatrader.com/support/foru...27&postcount=1

        If you can just utilize the existing control and add to it, the lines should no longer be a problem because that is an automatic action for manually submitted orders which would include the addon orders.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thanks, hopefully I can come up with a hybrid solution.

          Do you happen to know what kind of scaling the CC order lines use?

          For example, when I make the chart really wide it seems like they take up about 30% of the panel width but as I shrink it this percentage doesn't stay constant. It seems more involved than a simple percentage with a minimum width.

          Comment


            #6
            Hello HandsFreeTrader,

            I would not have the full details on the scaling here as this is an internally controlled item.

            The line's width is controlled partially by a property of the ChartTrader called "order display bar length". Because this is a property of the chart trader, it would not be something that is easily accessed but defaults to 25% of the chart width.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Ah, yeah if I had to guess I'd say it takes the 25% and then adds a constant 155px width a tag to the left

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by alifarahani, Today, 09:40 AM
              2 responses
              12 views
              0 likes
              Last Post alifarahani  
              Started by junkone, Today, 11:37 AM
              3 responses
              15 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by pickmyonlineclass, Today, 12:23 PM
              0 responses
              1 view
              0 likes
              Last Post pickmyonlineclass  
              Started by frankthearm, Yesterday, 09:08 AM
              12 responses
              44 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by quantismo, 04-17-2024, 05:13 PM
              5 responses
              35 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X