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 2,322 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




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

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?
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
Warsh Opens Today, Hormuz June 19 -- WTI Below $80, Fran …
Prediction Markets & Event Contracts
Iran Fired a Missile at Israel Last Night. The $8M June …
Prediction Markets & Event Contracts
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
Iran Talks Final Stages -- Two VLCCs Exit Hormuz, Record …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
10 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #3 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: NQ / ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,817 since Aug 2009
Thanks Given: 11,767
Thanks Received: 3,043



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 X 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


© 2026 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 - Downloads - Top
no new posts