PDA

View Full Version : Profit Target / Trail Stop Executed


dgregor5
08-19-2007, 06:40 AM
Hi:

If I enter a long position, I can send a message via the following:

If condition met,
Enter Long()
SendMail()

How do I do the same if the Profit Target or Trail Stop is executed ?
i.e.
If Profit Target Reached,
SendMail()

I am struggling to understand how I can ascertain how Profit Target is Reached via the strategy.

thx
David

NinjaTrader_Ray
08-19-2007, 09:10 AM
You would have to get creative and check several things such as position size and realized PnL, maybe the trades collection.

There is no simple approach to this at this time. NT 6.5 will make this easier.

dgregor5
08-19-2007, 09:36 AM
Your right - thx. I can use the Expected PnL to ascertain whether the Profit Target is hit.....trailing stop requires a little more creativity though.

thx
David

dgregor5
08-19-2007, 09:46 AM
by the way when is NT 6.5 being released ? thx

NinjaTrader_Dierk
08-19-2007, 10:03 AM
Fall time frame.

dgregor5
10-02-2007, 02:30 PM
Hello.
How is it possible (by whatever means) to track when a dynamic Trailing Stop exit has been executed (using SetTrailStop in OnBarUpdate). One can track the 'Value' of the TrailStop ...... I believe it reaches a minimum value of 1 and if the price moves down by one tick (long trade) then the trail stop will be executed.

If the value went to zero it would be easy, i.e

if (Value=0)
do the following.........

any ideas or pointers would be greatly appreciated.
thx
DAvid

NinjaTrader_Dierk
10-02-2007, 02:35 PM
You can do this with NT6.5 and track order status changes. Just be patient for a few more weeks.

NinjaTrader_Ray
10-02-2007, 02:35 PM
The only thing you can do right now is monitor the strategy's position.

dgregor5
10-02-2007, 02:41 PM
thx guys --- thought so.
any concrete dates for the NT6.5 release ?

thx DG

NinjaTrader_Dierk
10-02-2007, 02:46 PM
A few weeks from now until first beta. No ETA on release.

dgregor5
11-07-2007, 07:14 AM
Hi

A couple of weeks I submitted the following as part of this thread:

******************************************

Hello.
How is it possible (by whatever means) to track when a dynamic Trailing Stop exit has been executed (using SetTrailStop in OnBarUpdate). One can track the 'Value' of the TrailStop ...... I believe it reaches a minimum value of 1 and if the price moves down by one tick (long trade) then the trail stop will be executed.

If the value went to zero it would be easy, i.e

if (Value=0)
do the following.........

any ideas or pointers would be greatly appreciated.
thx
DAvid

***********************************

Can I assume that this is now possible with the new Beta version of NT.
If so, & CalculateOnBarClose=True, would the execution happen in real time still (like it tyipcally does for SetTrailStop) or would the execution happen OnBarClose?

many thx in advance
David

NinjaTrader_Ray
11-07-2007, 10:03 AM
Yes, see the NT 6.5 Beta Help Guide, OnOrderUpdate() method. This stuff is for experienced programmers and we will roll out reference samples in time. One already exists here -

http://www.ninjatrader-support.com/vb/showthread.php?t=3917

dgregor5
11-07-2007, 10:08 AM
thx Ray - regarding the second question..... if CalculateOnBarClose=True, does the OnOrderUpdate() method update in real time? i.e. not only update On Bar Close.

thx
DAvid

NinjaTrader_Ray
11-07-2007, 10:12 AM
Here is detailed answer to your question:

http://www.ninjatrader-support.com/HelpGuideV6/CalculateOnBarClose1.html

dgregor5
11-07-2007, 11:24 AM
Ray
Now i am confused.....

this is some of the text in the reference sample:

The OnOrderUpdate() method is updated whenever the state of an order changes which allows you to submit and control your stop-loss and profit target orders the instant your entry order is filled.

Now a TrailStop updates on every tick (i.e. new order for every up tick on a trailing stop) even if CalculateOnBarClose = True.

This appears to conflict with your last statement......

pls advise. thx

NinjaTrader_Ray
11-07-2007, 12:47 PM
Please be patient as we roll out some reference samples. Everything is in the documentation but I do understand, there is a lot to digest. Everything you want can be done in 6.5 but it crosses an area we like to say "Reserved for experienced programmers" since the nature of the capabilities is extremely powerful and can overwhelm any novice programmer. Unfortunately, I can't provide more guidance outside of the Help Guide during this initial beta phase.

Thanks for your understanding.

dgregor5
11-07-2007, 01:58 PM
Ray
Where do i find the NT 6.5 Beta Help Guide ? Doesn't appear to be on your website........ I am not trying to be a pain - just want to learn & would like to be pointed in the right direction.

thx
David

NinjaTrader_Ray
11-07-2007, 02:03 PM
Start NT6.5, press "F1" key to open the Help Guide.