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

Unmanaged Stop + Target Chart Trader Colors

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

    Unmanaged Stop + Target Chart Trader Colors

    Is there any way to make orders from an addon via Account.CreateOrder() respect the "Profit Target" and "Stop Loss" order types in the attached screenshot?

    All my orders are showing as Limit or Stop Market, there's no distinction between which are entries and which are profit/stoploss.
    Attached Files

    #2
    Hello frantic,

    Thank you for the post.

    After some review, it looks like this is currently part of the ATM system that causes this so there would not be a specific way I could suggest to cause this. It was noted this is part of the CustomOrder system which is an overload for the Create method. This is an undocumented portion of NinjaScript though so I would be unable to provide any details on this type of order creation, unfortunately.

    I have put in a feature request to document CustomOrder and the overload for Create that utilizes CustomOrder. I have also put in a feature request for an overload that has a StopLoss or ProfitTarget toggle.


    I look forward to being of further assistance.
    Last edited by NinjaTrader_Jesse; 04-27-2018, 07:48 AM.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hey Jesse,

      thanks for the response! I found the overload that takes a CustomOrder, and tried passing it an instance. I also inspected in the debugger orders that use CustomOrder via an ATM strategy - and I can't see any difference to the defaults.

      Could you give me more of a clue? Its really hard to see which orders are for scaling-in to my position and which are for exiting.


      Suzie

      Comment


        #4
        Hello frantic,

        Unfortunately not, in this case, this is not currently documented and there are no samples of CustomOrder that I am aware of. This is internally used but not documented for NinjaScript at this time. Once I have confirmation of the feature requests, I will post he ID numbers here for tracking.

        At this time there is no way I could suggest to have the chart trader recognize the manually created targets as ATM stopLoss or ProfitTargets automatically. The alternative would be to use the ATM system, that would color the orders correctly as those colors are for ATM's specifically.

        For CreateOrder, you would need to draw your own lines in the chart using an Indicator if you need further differentiation. Using the Addon account methods, you could retrieve orders and their names to do different drawing if necessary.

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

        Comment


          #5
          Ok then. - hopefully the developers will add something to the API at some stage that will allow us to assign orders as targets/stops to utilise the appropriate colors.

          Thank you for the support .

          Comment


            #6
            I would like to add a vote in for all the things requested here. Being able to flag orders as profit and stop/loss as well as documentation on how to use the CustomOrder object. Thank you.

            Comment


              #7
              Hello ntbone,

              I have added your votes. You can track this with ID: SFT-3180

              I look forward to being of further assistance.
              Last edited by NinjaTrader_Jesse; 07-12-2019, 03:05 PM.
              JesseNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by DJ888, 04-16-2024, 06:09 PM
              6 responses
              18 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by Jon17, Today, 04:33 PM
              0 responses
              1 view
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              6 views
              0 likes
              Last Post Javierw.ok  
              Started by timmbbo, Today, 08:59 AM
              2 responses
              10 views
              0 likes
              Last Post bltdavid  
              Started by alifarahani, Today, 09:40 AM
              6 responses
              41 views
              0 likes
              Last Post alifarahani  
              Working...
              X