PDA

View Full Version : How to set profit target / stop loss based on entry price?


tealover007
01-27-2010, 03:29 PM
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).

NinjaTrader_Bertrand
01-27-2010, 04:05 PM
tealover007, you want to make sure you reset the stop and target once flat as in this sample -

http://www.ninjatrader-support2.com/vb/showthread.php?t=3222

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

http://www.ninjatrader-support2.com/vb/showthread.php?t=6652

tealover007
02-01-2010, 01:26 PM
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.

NinjaTrader_Bertrand
02-01-2010, 02:49 PM
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/vb/showthread.php?t=3225

tealover007
02-01-2010, 06:12 PM
it worked.