Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM Strategy or NinjaScript?

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

    ATM Strategy or NinjaScript?

    I would like to use the ATM Strategy or NinjaScript to automate my trade entry and exit.

    Here's the scenario...

    First, I would like to setup two entry points as an OCO bracketing the current price (see Example 1 pic). This will be entered manually. When one of the limit orders is executed, the other will be removed.

    Second (see Example 2 pic), the executed order has two exit targets. The first is a profit target at 3-ticks from the entry, and the second is a reverse position (6x the original entry) that is 4-ticks from the entry with a profit target 2-ticks from the reversal entry. If the reverse order is executed, then the original 3-tick profit target is removed.

    NOTE: if the original entry is 1 contract, then the reverse entry will be a stop-loss market order 6x the original entry (1 contract to close the original entry, and 5 contracts for the current position). The profit target will be a limit order of 5 contracts to close out the position.

    Can this be done with the ATM Strategy window, or does it need to be programmed?

    Thanks for your help,
    Ron
    Attached Files
    Last edited by ronhb107; 04-13-2017, 03:46 PM.

    #2
    Hello Ron,

    Thanks for opening the thread.

    Second (see Example 2 pic), the executed order has two exit targets. The first is a profit target at 3-ticks from the entry, and the second is a reverse position (6x the original entry) that is 4-ticks from the entry with a profit target 2-ticks from the reversal entry. If the reverse order is executed, then the original 3-tick profit target is removed.
    When using ATM strategies, you can set profit targets and stop losses as exit orders and you can also use settings to reverse at stop and reverse at target. These profit targets and stop losses will have the same value for reversals then for entries. You cannot use an ATM strategy to change the profit target, but you can set up auto breakeven or auto trail settings to adjust the stop loss.

    NOTE: if the original entry is 1 contract, then the reverse entry will be a limit order 6x the original entry (1 contract to close the original entry, and 5 contracts for the current position). The profit target will be a limit order of 5 contracts to close out the position.
    You will not be able to create an ATM strategy that has different behavior depending on the order quantity.

    Based on the complexity on what you are trying to accomplish I would suggest making this strategy with NinjaScript.

    You may wish to use the Strategy Builder to design the logic, or you may wish to create the strategy entirely in the NinjaScript Editor.

    Strategy Builder 301 - https://www.youtube.com/watch?v=HCyt...ZmVnauWXkWe0Nf

    NinjaScript Editor 401 - https://www.youtube.com/watch?v=BA0W...ZmVnauWXkWe0Nf

    If you have any additional questions, please don't hesitate to ask.
    JimNinjaTrader Customer Service

    Comment


      #3
      ATM Strategy or NinjaScript?

      Thanks Jim.

      One quick question...

      Can a NinjaScript strategy work with a manual entry? That is, I will be manually placing the limit orders. After a limit order is executed (a position opened), can the strategy then take over and enter both a profit and stop-loss instantly?

      Thanks,
      Ron

      Comment


        #4
        Hello Ron,

        This would not necessarily be possible using a Strategy specifically. NinjaScript strategies are ideally intended to be only used for automatic trade management without user interaction. It is possible to use more advanced approaches in manual coding such as creating your own buttons in the chart to enter strategy orders. Using this type approach would not take advantage of order submitted using other tools like the superDOM as an example.

        NT8 offers other more advanced items such as add-ons which could take advantage of manual order entries but this is a very complex subject. If you would like information on this topic please refer to this page: http://ninjatrader.com/support/helpG...t_overview.htm

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

        Comment


          #5
          Ok Jesse.

          Is there a way to fool a NinjaScript Strategy to enter a trade (even an OCO) automatically when the price of the underlying reaches a drawing tool (i.e., horizontal line)? This should then allow the creation of the stops and targets not covered by the ATM front-end.

          Btw, to simulate an OCO, there would be two horizontal lines created. If one results in an entry, then all horizontal lines will be erased automatically.

          Ron
          Last edited by ronhb107; 04-24-2017, 11:33 AM.

          Comment


            #6
            Hello ronhb107,

            Yes, a drawing tool would be one way to create manual entries with a strategy. You can certainly program any logic surrounding the drawn objects that you draw such as entries, exits or other actions.

            This would go along with what I had provided as an example before or create buttons. Some form of user interaction that is scriptable would be needed, so long as you can trigger logic in the strategy you could submit managed/unmanaged/ATM strategy orders from that strategy at your will.

            Please see this document for details on looping through drawing objects on the chart and accessing them by name: http://ninjatrader.com/support/helpG...ub=drawobjects

            Also please be aware of the following items if you plan to export the strategy to provide to others while using Drawing objects: http://ninjatrader.com/support/helpG...ghtsub=dynamic

            Please be aware that this is still not to be mixed directly with manual orders, the strategy will simply not see them. For example using the Superdom to enter an order and then using a drawing tool to close the order with the strategy would not allow the account performance items to work successfully. You would need to enter using the drawing object with the strategy, and then allow it to exit the trade programmatically or wait for another drawing object for targets.



            If you want the ability to use any tool for the entry you would still be looking at using the Addon account items to subscribe to the order events.


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

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NRITV, Today, 01:15 PM
            2 responses
            6 views
            0 likes
            Last Post NRITV
            by NRITV
             
            Started by frankthearm, Today, 09:08 AM
            7 responses
            30 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by maybeimnotrader, Yesterday, 05:46 PM
            5 responses
            25 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by quantismo, Yesterday, 05:13 PM
            2 responses
            19 views
            0 likes
            Last Post quantismo  
            Started by adeelshahzad, Today, 03:54 AM
            5 responses
            33 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X