Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom Chart trader

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

    Custom Chart trader

    I am developing strategy which has its logic to enter the position. When strategy enters the position I also need to manage trade manually. I would like to place objects - just like in chart trader which allow me to change profit target and stoploss. Do you have any ideas how to create these objects? My first tought wast use draw objects (line) etc. but I don't think it's elegant solution.
    Thanks for help and tips
    Kujista

    #2
    Hello kujista,

    Thanks for your post.

    In general, strategies are intended to run without user manipulation. What you are describing is possible using a hybrid strategy which uses the strategy to locate and place entry orders and when filled the control of the exits is handled by an ATM which would allow you to adjust as you wish or let run as built. Once the exit order (profit or stop) is filled the other order is canceled and control returns to the strategy to find the next entry.

    This type of strategy uses special methods to connect to an ATM strategy and you can view these here: https://ninjatrader.com/support/help...gy_methods.htm

    In your Ninjatrader is the strategy example "SampleAtmStrategy" that you can examine and test with. The code of the sample strategy is well documented to help in understanding how the methods work. The requirement for these type strategies is to have a named ATM template that the strategy can call and use. How the ATM is configured would be up to you.



    Comment


      #3
      Well if i have my custom strategy, then i can use atm to move pt, sl or exit entry from my custom strategy? If so, i need callback which passes exit order (pt, sl or exit) to my custom strategy, where i can process it further. Anyway, i have managed handling pt or sl inside my strategy, all i need is to draw theese nice objects, that i tagged with arrow on screen. I just need object, have choice to move it per tick up or down and after release have callback that object position changed. Do you understand me?

      Comment


        #4
        Hello kujista,

        Thanks for your reply.

        Please review and test the SampleAtmStrategy as I think what you want to do is considerably more complicated/unnecessary when compared to writing your strategy with NinjaTrader ATM methods and using your own ATM strategy templates.

        Comment


          #5
          Thanks for answer. I will be more specific.
          My strategy places entry order, profit target and stoploss. Profit target and stoploss are not fixed but calculated by indictator(s) which my strategy uses. Then it can also move stoploss according to trade development - uses indicator to calculate sl movement to break evens. Besides this behavior i want user to be able to move stoploss manuallz wherever he wants. I am not sure that using atm strategy will keep behavior based on indicator inside strategy and adds behavior of manual changing stoploss to specific price

          Comment


            #6
            Hello kujista,

            It is possible to send information into your strategy from manual controls.

            As an example I am linking (a publicly available link) the Long Short Toolbar Buttons strategy in the User Submitted Apps section of the ecosystem.


            This sounds like a good learning opportunity to provide manual input to a script for useful means.

            We would like to confirm: You want an exit order initially updating to the price of an indicator, then after the user intervenes you want the price of that order to stay where they put it, is this correct?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Yes, i think you understand... keep my strategy to control trade, but user can move stop loss and profit target with mouse. After that, my strategy must know about that to process it.

              Comment


                #8
                Hello kujista,

                Thanks for your reply.

                I've modified the Long Short Toolbar Buttons strategy that Chelsea provided a link to. The example I am attaching is to demonstrate that when an entry order is filled it is tied to an exit order on an indicator(SMA(50) moving average). Using a button on the chart, the user can click to a fixed stop level (i've set at 5 ticks). Clicking the button again will move the stop back to the 50 SMA, etc. The example assumes that the current price is above the 50 period SMA, it is by no means a complete or stand-alone and is only provided to demonstrate how to connect a button for user input to change your orders. As you observed you can also use a horizontal line draw object by looping through the draw objects collection, perhaps by a specific tag name, to tie an exit to a line moved by a user (instead of the 5 tick fixed stop shown in the strategy).
                Attached Files

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Today, 05:17 AM
                0 responses
                23 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                120 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                63 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                41 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                45 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X