Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to set profit target / stop loss based on entry price?

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

    How to set profit target / stop loss based on entry price?

    I am OK with order being filled the next day after my sell/buy signal. That's fine. (kind of, but I am not discussing it here).

    Hooray! Order filled. Now I would like to set profit target / stop loss based on the entry price (it's market order, because if next day market opens in my favor I don't want to loose this money).

    Now at the same bar order was filled, I am witnessing interesting phenomena: it exited already, because guess what.... whatever was set last time for profit target / stop loss was still in place.

    I didn't even have a chance to set it, because it's supposed to be based on the AvgPrice of the position!!! Yet, it's already gone, position is exited. Game over.

    Yet, under a lot of circumstances if order is filled on Open, profit target / stop loss, based on the open price will be reached in the same day and it's not looking into the future.


    So my big question is: how to set profit target/ open loss based on the open price (not %, but certain calculated number, which is function on the avg order fill price).

    #2
    tealover007, you want to make sure you reset the stop and target once flat as in this sample -



    You could work with an added finer intraday series to execute to and then adjust stops and targets after the open of your instrument.

    You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by

    Comment


      #3
      SetProfitTarget

      I think I need more detailed information on SetProfitTarget and how it works. These samples above don't even have any examples about SetProfitTarget (rather SetStopLoss).

      I have multi instruments and multi time frame strategy. (I would have it single instrument if Strategy Analyzer could test multiple symbols cumulatively, but it doesn't matter in that context).

      1) So, I am getting enter signal from one time frame for particular instrument, say QQQ.

      2) when some conditions met, I want to let's say go long in different time frame for the same instrument, QQQ; Also it would be nice to set Profit target at the same time.

      The problem is as I see it: the SetProfitTarget works globally, i.e. first filled order (say went long) triggers submitting orders for the profit target for the instrument. DIFFERENT instrument could trigger sending profit targets that doesn't belong to it.

      Am I correct?

      If I am, I will have to "manually" check if position is long on particular instrument and then execute SetProfitTarget. (I guess???)

      But still, I kind of hate to be right in that case because it's akward, I'd expect from the SetProfitTarget work in the same context as where I call it. Maybe it does work that way, but I don't know how to check it. Does it or not?

      Thanks in advance.
      Last edited by tealover007; 02-01-2010, 02:29 PM.

      Comment


        #4
        tealover007, in a MultiSeries strategy with multiple entries and exits you want to use unique signal names, so you can tie stops and target to those directly via the 'fromEntrySignal' paramter in the overloads - http://www.ninjatrader-support2.com/...ead.php?t=3225

        Comment


          #5
          Thanks!

          it worked.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          633 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          364 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          567 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          568 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X