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

Usage of ChartTrader in Add-On

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

    Usage of ChartTrader in Add-On

    I have implemented a new kind of chart type in my Add-On and like to integrate NT's ChartTrader in my chart.
    Is there any chance to do this? To use the ChartTrader without ChartControl?
    I really appreciate any information, details or examples!

    #2
    Hello ruppschtaler,

    This would be outside of what is supported by NinjaTrader Support.

    However, this thread will remain open for any community members that may know of a way or have an example.

    As a tip, the Chart Trader area is a wpf grid.

    Below are links to a few indicators you may find helpful.
    Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've



    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,

      I'm currently rebuilding an independant version of NT's chart trader in my Add-On since I don't use NT's ChartControl.
      I like to integrate NinjaTrader.Gui.Chart.ChartTraderProperties to supply the globally defined chart trader properties.
      Can you please give a hint how to access these persistent saved chart trader properties of NT without the use of NT's ChartControl or ChartTrader?

      Thank you

      Comment


        #4
        Hello ruppschtaler,

        I'm not aware of any documented or undocumented ways to get the chart trader properties without a chart control.

        This thread will remain open for any community members that may know of an undocumented way to achieve this.

        You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Chelsea

          Thank you for posting these informative examples. I have a question somewhat along the lines of ruppschtaler and thought I'd post here.

          I'm not sure how to ask this, but I'm looking to develop a custom side panel that will allow me to configure an ATM strategy LIMIT order graphically. Most importantly, I would like the ability to graphically drag the stop loss and profit targets on the graph area ala the way one can update a limit order once you've placed a limit order with Chart Trader, before actually placing the order.

          Can you help with an example on how to access the control for the limit order once it is placed?

          Thank you.

          Comment


            #6
            Hello janseun,

            Attached is an example that demonstrates modifying a limit order from an Addon.

            The main difference in your script, is that you will need to loop through the account orders and locate the order in question.

            This example will only place a single order and then chase with the limit and trail with the stop market.

            This creates a new window Addon. The code from within ProfitChaseStopTrailAddonExampleWindow could also be adapted to an indicator or NinjaScript strategy.

            (updated May 23rd, 2018)
            Attached Files
            Last edited by NinjaTrader_ChelseaB; 09-03-2019, 02:38 PM.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello janseun,

              Attached is an example that demonstrates modifying a limit order from an Addon.

              The main difference in your script, is that you will need to loop through the account orders and locate the order in question.

              This example will only place a single order and then chase with the limit and trail with the stop market.

              This creates a new window Addon. The code from within ProfitChaseStopTrailAddonExampleWindow could also be adapted to an indicator or NinjaScript strategy.

              (updated May 23rd, 2018)
              i have a indicator that i would like to turn to a addon do you think this can atually help me do that or do you have a better example that i could use

              Comment


                #8
                Hello jhontorres,

                This addon example provides a lot of what is needed, such as how to construct an addon window and add a menu item to the New menu to open it.

                Indicators generally will plot or draw on a chart, so keep in mind an Addon would not be intended for modifying a chart.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hello jhontorres,

                  This addon example provides a lot of what is needed, such as how to construct an addon window and add a menu item to the New menu to open it.

                  Indicators generally will plot or draw on a chart, so keep in mind an Addon would not be intended for modifying a chart.
                  Hi Chelsea,

                  Could you please give a sample ChartTrader indicator to show how to use this Addon.

                  Regards.

                  Omololu

                  Comment


                    #10
                    Hello Omololu,

                    Are you trying to take an indicator that would normally be applied to a chart and make this an addon in it's own separate window?

                    Or are you trying to take an addon that is in a separate window and turn this into an indicator that is applied to a chart?

                    Are you trying to make an indicator that is applied to a chart that uses the addon approach at placing orders directly to an account?

                    Regarding ChartTrader, this is an area on the right of a chart that allows you to click buttons and the chart to place orders
                    What do you want from chart trader?
                    Do you want the Account selector or the AtmStrategy Selector?
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_ChelseaB View Post
                      Hello Omololu,

                      Are you trying to take an indicator that would normally be applied to a chart and make this an addon in it's own separate window?

                      Or are you trying to take an addon that is in a separate window and turn this into an indicator that is applied to a chart?

                      Are you trying to make an indicator that is applied to a chart that uses the addon approach at placing orders directly to an account?

                      Regarding ChartTrader, this is an area on the right of a chart that allows you to click buttons and the chart to place orders
                      What do you want from chart trader?
                      Do you want the Account selector or the AtmStrategy Selector?
                      Thanks, Chelsea for your reply.

                      I want "to make an indicator that is applied to a chart that uses the Addon approach at placing Market, Limit and StopLimit orders (see attached screenshot)" ... and I "want the Account selector" to be able to select account and order, but without hard coding the Account and Instrument and as as shown in the codes (i. e. "Sim101" and "CL 12-20") below'

                      myAccount = Account.All.FirstOrDefault(a => a.Name == "Sim101");

                      entryOrder = myAccount.CreateOrder(Cbi.Instrument.GetInstrument ("CL 12-20"), OrderAction.Buy, OrderType.Market, OrderEntry.Automated, TimeInForce.Day, 3, 10, 0, string.Empty, "entryOrder", Core.Globals.MaxDate, null);


                      Regards.

                      Click image for larger version

Name:	ChartTrader.png
Views:	1566
Size:	44.0 KB
ID:	1123934

                      Comment


                        #12
                        Hello omololu,

                        Below is a link to an example of getting the selected account from the ChartTraderControlAccountSelector.
                        (edit, link was missing)


                        The Instrument will already be provided to the script that is applied to the chart.
                        https://ninjatrader.com/support/help...instrument.htm
                        Last edited by NinjaTrader_ChelseaB; 10-22-2020, 10:40 AM.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_ChelseaB View Post
                          Hello omololu,

                          Below is a link to an example of getting the selected account from the ChartTraderControlAccountSelector.

                          The Instrument will already be provided to the script that is applied to the chart.
                          https://ninjatrader.com/support/help...instrument.htm
                          Hi Chelsea,

                          Thanks for your reply.

                          1. A relevant part of the link you provided is "Instrument myInstrument = Instrument.GetInstrument("AAPL");", but this is still showing that the instrument "AAPL" is hard/manually coded. Is it correct to just code "Instrument myInstrument = Instrument.GetInstrument();(i. e. without specifying the instrument). Will the instrument automatically be the instrument applied to the chart ?

                          2. Your reply does not mention my question on "myAccount = Account.All.FirstOrDefault(a => a.Name == "Sim101"); ... Sim101 is manually/hard coded ... Is this the only way out ?". My desire is also to place Limit and StopLimit orders. The indicator shown on my screenshot only does Market order and as shown in the code "entryOrder = myAccount.CreateOrder(Cbi.Instrument.GetInstrument ("CL 12-20"), OrderAction.Buy, OrderType.Market, OrderEntry.Automated, TimeInForce.Day, 3, 10, 0, string.Empty, "entryOrder", Core.Globals.MaxDate, null);". What is the correct "entryOrder =" code to do Limit and StopLimit orders ? Can the Cbi.Getinstrument be replaced with just myInstrument as defined in 1. above.

                          Regards.

                          Omololu

                          Comment


                            #14
                            Hello Omololu,

                            Somehow I didn't paste in the link my previous post. Apologies.
                            The example is demonstrating how to find the chart trader account selector from the AutomationId.

                            The Instrument property will already exist with an indicator. You will not have not get an Instrument as one will already be provided.

                            Chelsea B.NinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by DJ888, 04-16-2024, 06:09 PM
                            4 responses
                            12 views
                            0 likes
                            Last Post DJ888
                            by DJ888
                             
                            Started by terofs, Today, 04:18 PM
                            0 responses
                            7 views
                            0 likes
                            Last Post terofs
                            by terofs
                             
                            Started by nandhumca, Today, 03:41 PM
                            0 responses
                            6 views
                            0 likes
                            Last Post nandhumca  
                            Started by The_Sec, Today, 03:37 PM
                            0 responses
                            3 views
                            0 likes
                            Last Post The_Sec
                            by The_Sec
                             
                            Started by GwFutures1988, Today, 02:48 PM
                            1 response
                            9 views
                            0 likes
                            Last Post NinjaTrader_Clayton  
                            Working...
                            X