Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

script strategy targets manually

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

    script strategy targets manually

    Hello,

    I want to ask if there is a possibility when running a NT-script-strategy to enter a target once a trade is in the market. I remember that there was some tool and I saw the link (given by NT-support) but this was about 2 years ago and I can´t find it again.

    To give an example: if there is a long trade (with stops by the script) and the currentask is at 16312 and because of certain market conditions I want to take the exit once 16314 is triggered. I know I could move the target with chart-trader. And I know I can handle the targets from chart-trader in a script but the problem is always that then the target would be at the exchange. This is what I will never do again (no OCO anymore!) And everyone who had suffered an internet outage will confirm my opinion.


    Thank you
    Tony

    #2
    Hello tonynt,.

    Thank you for your note.

    Is the SetProfitTarget() not going to work for this?

    You can set the price (or amount of ticks) of the target before submitting the entry order and when the order fills the target will be placed.

    http://www.ninjatrader.com/support/h...ofittarget.htm

    Let me know if SetProfitTarget() will not work for you.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      sorry if I could not explain correctly(?)

      With setprofittarget this is on the exchange, no? I wrote that I don´t want to have the target on the exchange. (If one can do an OCO with stop on the exchange but target held locally on the PC this would be OK).

      And you write in your reply that I can set the price before submitting the entry order. I asked how to do when the entry is already done.

      Best regards
      Tony


      Originally posted by NinjaTrader_ChelseaB View Post
      Hello tonynt,.

      Thank you for your note.

      Is the SetProfitTarget() not going to work for this?

      You can set the price (or amount of ticks) of the target before submitting the entry order and when the order fills the target will be placed.



      Let me know if SetProfitTarget() will not work for you.

      Comment


        #4
        Hi tonynt,

        Thanks for the clarification.

        Basically you can use logic to submit market orders when conditions are true.

        This would prevent orders from sitting with the broker such as a limit order that is used for a profit target.

        Basically, you would need custom logic. When the order is entered you will want to set the price that the exit will happen to a variable. You can do this in OnExecution. Then in OnMarketData you can check every tick to see if the price has risen or fallen to your saved exit price. If you are long and the bid price hits your value submit a sell market order. If you are short and the ask price hits your value submit a buy market order.

        Below is a link to OnExecution and OnMarketData in the help guide.
        OnExecution - http://www.ninjatrader.com/support/h...nexecution.htm
        OnMarketData - http://www.ninjatrader.com/support/h...marketdata.htm
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello,

          thank you for your reply.

          This is what I do for already 2 years now - targets with condtions in the script. I can do with pre-defined ticks in profit and with certain condtions to do the exit.

          But what I want to add now is to exit the trade at a price that is not known before the entry (this makes sense, because why do you want to exit with eg 5 ticks when it is expected that the market will move more and vv)

          a.) So I need somehow to enter the price during the trade, this is what I ask for.

          OR

          b.) it would be also fine if the target in chart-trader could be residing only on the PC (because this target can be added to a script and then be moved to the exit price)

          I hope I could clearify even more my thoughts.

          Thank you in advance to check a.) and b.)


          Best regards
          Tony


          Originally posted by NinjaTrader_ChelseaB View Post
          Hi tonynt,

          Thanks for the clarification.

          Basically you can use logic to submit market orders when conditions are true.

          This would prevent orders from sitting with the broker such as a limit order that is used for a profit target.

          Basically, you would need custom logic. When the order is entered you will want to set the price that the exit will happen to a variable. You can do this in OnExecution. Then in OnMarketData you can check every tick to see if the price has risen or fallen to your saved exit price. If you are long and the bid price hits your value submit a sell market order. If you are short and the ask price hits your value submit a buy market order.

          Below is a link to OnExecution and OnMarketData in the help guide.
          OnExecution - http://www.ninjatrader.com/support/h...nexecution.htm
          OnMarketData - http://www.ninjatrader.com/support/h...marketdata.htm
          Last edited by tonynt; 01-22-2014, 04:14 PM. Reason: typing error

          Comment


            #6
            Hello tonytnt,

            I want to mention first that it is not possible to have a NinjaTrader generated profit target to be on the local pc only. Any limit order that is submitted will be resting on the broker's server.

            This means that you are going to want to use a market order and submit this once the price has hit your level.

            This price level can be set to a variable at any time and can be changed at will even after your entry.

            I am not quite sure what you are trying to accomplish. If you are not wanting the order to sit with the broker you will need to use a market order that you submit when the time is right.
            If you are using a market order, you will not be able to set the price for this. Instead a market order will fill immediately when submitted.

            Please let me know what you are trying to accomplish.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            3 views
            0 likes
            Last Post jaybedreamin  
            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  
            Working...
            X