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.
    https://ninjatrader.com/support/foru...327#post499327


    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, 01: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:	546
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)
                        https://ninjatrader.com/support/foru...98#post1055898

                        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, 09: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 Angus7, Today, 06:03 AM
                            0 responses
                            9 views
                            0 likes
                            Last Post Angus7
                            by Angus7
                             
                            Started by Rhoamajhunm, Today, 05:15 AM
                            0 responses
                            10 views
                            0 likes
                            Last Post Rhoamajhunm  
                            Started by cannaleafzcoast, Yesterday, 11:46 PM
                            0 responses
                            18 views
                            0 likes
                            Last Post cannaleafzcoast  
                            Started by BiankaRidge, Yesterday, 11:37 PM
                            0 responses
                            21 views
                            0 likes
                            Last Post BiankaRidge  
                            Started by RodBlanda, Yesterday, 09:58 PM
                            0 responses
                            19 views
                            0 likes
                            Last Post RodBlanda  
                            Working...
                            X