I have one other problem, it seems to give me results as if I have moved my stop...I am testing an exit at 60 pips, I have not put any trailing stop code in, but it seems to give me profit results which are positive based on exiting at the stop, i.e. not 60 pips but a variety of amounts below 60 pips. Is there an inbuilt trailing stop at work?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Stop Loss Offset
Collapse
X
-
Thanks Dierk, that works!
I have one other problem, it seems to give me results as if I have moved my stop...I am testing an exit at 60 pips, I have not put any trailing stop code in, but it seems to give me profit results which are positive based on exiting at the stop, i.e. not 60 pips but a variety of amounts below 60 pips. Is there an inbuilt trailing stop at work?
-
>> Is there an inbuilt trailing stop at work?
No, unless you coded it. I suggest tracing your strategy as per here to understand what's going on: http://www.ninjatrader-support.com/v...ead.php?t=3627DierkNinjaTrader Customer Service
Comment
-
What I've found out is that it's reading the stop calculation as a moving stop - recalculating on every new bar update it so that it moves with price, similar to a trailing stop - I've looked at the charts and it stops out on a retracement, rather than continuing to the profit target. I guess this means a price action entry where you place stops one pip under/above the recent low or high is not possible to test for.
Comment
-
The reason your stop keeps moving while in the OnBarUpdate() is because it is constantly submitting modifications to your stop price. If this is not intended behavior you need to also have a limiting condition that only submits your stop once at given price for your entry.Josh P.NinjaTrader Customer Service
Comment
-
For one, you could throw it with the condition for entry.
Code:if (some entry condition) { if (Position.MarketPosition == MarketPosition.Flat) { SetStopLoss(...); EnterLong(); } }
You may get some other ideas for other things you can do with this reference sample: http://www.ninjatrader-support.com/v...ead.php?t=3222Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by minds2010, Today, 03:38 AM
|
1 response
11 views
0 likes
|
Last Post
|
||
Started by DTSSTS, Yesterday, 07:11 PM
|
2 responses
32 views
0 likes
|
Last Post
|
||
Started by ntbone, Yesterday, 11:42 PM
|
1 response
14 views
0 likes
|
Last Post
|
||
Started by mr_trade, 11-26-2020, 05:01 PM
|
5 responses
59 views
0 likes
|
Last Post
![]()
by mr_trade
Today, 06:12 AM
|
||
Started by evanp90, 01-14-2021, 07:03 PM
|
4 responses
33 views
0 likes
|
Last Post
|
Comment