Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ATR stop out on multipule orders
Collapse
X
-
ATR stop out on multipule orders
Hello - My strategy has multiple entries and I'd like to pull my stop out up to one ATR below (or above on shorts) to my last entry. Can you point me in the right direction to program this? thanksTags: None
-
titleistbb22, you would need to use unique entry names for the signals and then attach the SetStopLoss() as needed -
You can for example calculate the ATR stop value as tried to price and then use SetStopLoss in price mode to set / update the stop.
BertrandNinjaTrader Customer Service
-
Thank you - very helpful - I think the below code is what you are refering to in tying ATR to price
//Breakeven stop
if (Position.GetProfitLoss(Close[0], PerformanceUnit.Points) > ATR(15)[0])
{
SetStopLoss(CalculationMode.Price, Position.AvgPrice);
}
This seems to make sense but it kicks me out on some short positions with our hitting the 1 ATR in profit. Any thoughts? thanksLast edited by titleistbb22; 05-14-2010, 11:14 PM.
Comment
-
Fair enough - a few questions for you on SetTrailStop and SetStopLoss.
I understand that SetStopLoss takes precedence, but can I use multiple StopLoss and TrailStop entries together? Or does the StopLoss simply cancel out the TrailStop?
Can I simply use either multiple StopLoss OR TrailStop orders on the same entry instead of using a mix of StopLoss and TrailStop orders?
Also, what is the difference in how the TrailStop works vs the StopLoss?
Thanks in advance for your time in answering these questions
Comment
-
If you don't use the advanced overload then SetStopLoss() is applied to all entries.
You would have to use an advanced overload method that includes FromEntrySignal if you wanted to use both methods in the same strategy.
SetStopLoss(string fromEntrySignal, CalculationMode mode,double value,bool simulated)
You could then apply SetStopLoss() to one entry and SetTrailStop() to another.
A stop loss submits a fixed order in relation to your entry price.
A trailstop is ammended on a tick by tick basis in relation to the current traded price.Ryan M.NinjaTrader Customer Service
Comment
-
thank you - so I read that I can not use Trailing and Set Stop loss on the same entry. Is that correct?
Comment
-
That's correct titleistbb22 - to have a static stop after entry and then a trail later as the trade progresses, please see the reference sample for adapting stop and target orders from one of my previous replies, this will be the way to go, there're also good starting points in the sharing section on custom trailing algorithms.BertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by andrewtrades, Today, 04:57 PM
|
1 response
8 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
6 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
7 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM |
Comment