NexusFi: Find Your Edge


Home Menu

 





Trailing Stop - 3 Bar


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one cory with 2 posts (6 thanks)
    2. looks_two KrazyTrader with 2 posts (2 thanks)
    3. looks_3 master trader with 1 posts (0 thanks)
    4. looks_4 Blash with 1 posts (1 thanks)
      Best Posters
    1. looks_one cory with 3 thanks per post
    2. looks_two KrazyTrader with 1 thanks per post
    3. looks_3 jwhtrades with 1 thanks per post
    4. looks_4 Blash with 1 thanks per post
    1. trending_up 1,940 views
    2. thumb_up 10 thanks given
    3. group 5 followers
    1. forum 6 posts
    2. attach_file 1 attachments




 
Search this Thread

Trailing Stop - 3 Bar

  #1 (permalink)
 KrazyTrader 
Dallas, TX/USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES, CL
Posts: 51 since Aug 2013
Thanks Given: 56
Thanks Received: 9

Hello,

Need some help with 3 Bar trailing stop.

When long i would like to trail a stop at the lowest low of the last 3 bars and i'm missing something.

This is not working... Draw.Text(this, @"Long Stop", "--", 0, (MIN(Low(3)[0])), Brushes.Lime );

Thanks in advance.

Difference between discomfort and pain = 1 tick
Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Cheap historycal L1 data for stocks
Stocks and ETFs
About a successful futures trader who didn´t know anyth …
Psychology and Money Management
 
  #3 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090



KrazyTrader View Post
Hello,

Need some help with 3 Bar trailing stop.

When long i would like to trail a stop at the lowest low of the last 3 bars and i'm missing something.

This is not working... Draw.Text(this, @"Long Stop", "--", 0, (MIN(Low(3)[0])), Brushes.Lime );

Thanks in advance.

if you look at DonchianChannel code

Quoting 
else if (State == State.DataLoaded)
{
max = MAX(High, Period);
min = MIN(Low, Period);
}

so it should be
double minvalue = MIN(Low, 3)[0];
Print (" lowest in 3 bars "+ minvalue);
...

Reply With Quote
Thanked by:
  #4 (permalink)
 KrazyTrader 
Dallas, TX/USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES, CL
Posts: 51 since Aug 2013
Thanks Given: 56
Thanks Received: 9


cory View Post
if you look at DonchianChannel code


so it should be
double minvalue = MIN(Low, 3)[0];
Print (" lowest in 3 bars "+ minvalue);
...

where does double min value = MIN(Low,3[0]; go?

Difference between discomfort and pain = 1 tick
Started this thread Reply With Quote
Thanked by:
  #5 (permalink)
 
Blash's Avatar
 Blash 
Chicago, IL
Legendary Market Chamois
 
Experience: None
Platform: NT8,NT7,TWS
Broker: InteractiveBrokers, S5T, IQFeed
Trading: The one I'm creating in the present....Index Futures mini/micro, ZF
Posts: 2,311 since Nov 2011
Thanks Given: 7,341
Thanks Received: 4,518


KrazyTrader View Post
where does double min value = MIN(Low,3[0]; go?

Coding like this is basically hacking. All trial and error. Don't be afraid of compiler errors. Just place the code in diff places, hit F5, and see if it works. Rinse and repeat etc....

Ron

...My calamity is My providence, outwardly it is fire and vengeance, but inwardly it is light and mercy...
The steed of this Valley is pain; and if there be no pain this journey will never end.
Buy Low And Sell High (read left to right or right to left....lol)
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #6 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

here is the code sample

Attached Files
Elite Membership required to download: BarsTrailingStop.cs
Reply With Quote
  #7 (permalink)
 
jwhtrades's Avatar
 jwhtrades 
woodstock, ga
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Futures, TF, CL
Posts: 163 since Feb 2011
Thanks Given: 670
Thanks Received: 92


cory View Post
here is the code sample


Thank you Cory, this is exactly what I was looking for today. Have a great holiday season.
John

Reply With Quote
Thanked by:




Last Updated on December 24, 2018


© 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