Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Trail stop in strategy not working.
Collapse
X
-
It would be nice to figure this out with different options. I circumvented this issue because my indicators hit sell way before trail stop. So I'm just gonna place a trail stop like Paul suggested way down in strategy builder on bar close. Just for kicks. I dont think it will ever get used. However, will follow this thread and learn more details about what Paul said and how ticks affect other things and post back later
-
However in the remote case the contract is in place and the NT crashes on local machine or VM, while one is away or sleeping :--). It would be nice to have a trail stop submitted.
Comment
-
Hello obwon1,
Thanks for your post.
1) It is important to understand that the strategy will always maintain its "virtual position" So when the strategy has a position and then you manually close the position, the strategy ignores anything it did not do so in your example it would have continued as if it had a position and would move the stop. The stop is a live order so when it is filled it would have created a new position instead of making the account flat because the account was already flat when you manually closed the position. Bottom line is, do not manually close an automated strategy position unless you intend to also stop the strategy as otherwise, it will continue performing according to the logic you created.Originally posted by obwon1 View Postiv noticed that
else if (State == State.Configure)
{
SetTrailStop(CalculationMode.Percent, .02);
percentage works, but two things happen that trouble me
1 it places a stop loss regardless of open position, based on previous strategy history even though I may have closed my position manually
2. when triggered this becomes a market order and not a market limit order ( this opens up a can of worms where even a small 5 contracts gets filled at 5 different prices)
any one know how to avoid or improve 1 and 2 ?
2) The SetTrailStop() method will use a stopmarket order to exit as this is the best way to ensure that the stop is filled whereas a limit order may or may not get filled. You can certainly create your own trailing stop and use limit type orders if you wish but again the risk is the limit order not being filled based on the market conditions.
Comment
-
Thats great info Paul. I haven't yet gotten to studying (see attached file) this page NinjaTrader 8
Any tips would be helpful for a strategy that is intended to run 24/7 and account for following.
1. Strategy that runs 24/7.
2. Machine needs to be restarted once a week.
3. Strategy needs to be restarted for manual quantity change every once in a while.
4. Account for NT or local machine crashes.
5. Any other reason for manually stopping strategy and restarting and waiting for 20 bars.
a) So far I am liking "wait until flat and synchronize account". What are your thoughts?
b ) Any other places in NT where this could be managed?
c) Considering above it is probably better to submit the trailing order than simulate it? Correct?
Thanks you are awesome!Last edited by rocketstock; 01-04-2022, 12:35 PM.
Comment
-
Hello rocketstock,
Thanks for your reply.
Here are links for understanding the strategy builder:
Free live webinar every other Thursday at 4:00 PM EST, through this link to all webinars: https://ninjatrader.com/PlatformTraining
Previous recording of the Strategy Builder 301 webinar: https://youtu.be/HCyt90GAs9k?list=PL...auWXkWe0Nf&t=2
Help guide for the strategy builder: https://ninjatrader.com/support/help...gy_builder.htm
Tutorial using the Strategy Builder (Titled "Creating the Strategy by the Wizard): https://ninjatrader.com/support/help..._cross_ove.htm
For running a strategy from a chart, please see https://ninjatrader.com/support/help...g_ninjascript_ strategies.htm (Each link in there is worth reviewing).
Access the strategy performance: https://ninjatrader.com/support/help...RunningAninjas criptStrategyFromAChart
This one deals with strategy start behavior: https://ninjatrader.com/support/help...g_account_posi tions.htm Wait until flat is the default.
The strategy tab is an important page, please review: https://ninjatrader.com/support/help...eStrategiesTab
You can read about simulated stops here: https://ninjatrader.com/support/help...top_orders.htm
Please note that the topic title is "Trail stop in strategy not working". If you have further questions that are not related to the topic, please create a new thread as this helps the community find relevant info by topic. Thanks for your help and understanding.
Comment
-
- Likes 1
Comment
-
Hey Paul.
It's been great interacting. I think it was rude for you to point out the what the topic of this thread was. I know what it was. I think you overlooked the fact that you started the flat strategy discussion in this thread, so I posted to help the other poster out too with other related content. In future please let your colleagues respond to my questions. As new customers we'd rather feel free to learn the platform than be militant on limiting our thoughts focusing on how you would like the format to be done on an online forum.
Thanks,
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
71 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
143 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
76 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
47 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
51 views
0 likes
|
Last Post
|

Comment