NexusFi: Find Your Edge


Home Menu

 





IOrders TrailStop


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one MXASJ with 1 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 baruchs with 1 posts (0 thanks)
    4. looks_4 DavidHP with 1 posts (0 thanks)
    1. trending_up 1,772 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

IOrders TrailStop

  #1 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

I'm sure there is already an elegant solution to this, but what are those of you using IOrders in Ninja doing for a TrailStop?

I came up with this which runs in OnBarUpdate:

 
Code
if (Position.MarketPosition == MarketPosition.Long)
{
int myHi = HighestBar(High, BarsSinceEntry(0, "Entry 1a",0));
double myValueLong = High[myHi];
double stopValueLong = myValueLong - stopLoss * TickSize;

stopOrder1 = ExitLongStop(stopValueLong, "MyTrailStop", "Entry 1a");
}
Which kind of works... but what has been working well for others? Thanks!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Build trailing stop for micro index(s)
Psychology and Money Management
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #3 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,609 since Aug 2009
Thanks Given: 11,328
Thanks Received: 2,743



MXASJ View Post
I'm sure there is already an elegant solution to this, but what are those of you using IOrders in Ninja doing for a TrailStop?

I came up with this which runs in OnBarUpdate:

 
Code
if (Position.MarketPosition == MarketPosition.Long)
{
int myHi = HighestBar(High, BarsSinceEntry(0, "Entry 1a",0));
double myValueLong = High[myHi];
double stopValueLong = myValueLong - stopLoss * TickSize;

stopOrder1 = ExitLongStop(stopValueLong, "MyTrailStop", "Entry 1a");
}
Which kind of works... but what has been working well for others? Thanks!

MXASJ Did you come up with any other solutions?

Thanks,

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote
  #4 (permalink)
 baruchs 
Israel
 
Experience: Intermediate
Platform: NinjaTrader
Broker: pfg
Trading: eminis
Posts: 323 since Jun 2009

This is also what I do. I don't see why its not the best solution possible.
Only one correction:
I believe that it changes the actual stop order, then don't give it a new name "MyTrailStop", in live trading it won't work.

Reply With Quote




Last Updated on January 13, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts