Trailing Stop - 3 Bar - NinjaTrader Programming | futures io social day trading
futures io futures trading


Trailing Stop - 3 Bar
Updated: Views / Replies:309 / 6
Created: by KrazyTrader Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

 
 
Thread Tools
 

Trailing Stop - 3 Bar

 
Elite Member
Dallas, TX/USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, CL
 
Posts: 49 since Aug 2013
Thanks: 55 given, 9 received

Trailing Stop - 3 Bar

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
The following user says Thank You to KrazyTrader for this post:
 
 
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
 
the coin hunter
virginia
 
Trading Experience: Intermediate
Platform: ninja
Favorite Futures: NQ
 
cory's Avatar
 
Posts: 5,938 since Jun 2009
Thanks: 816 given, 7,616 received
Forum Reputation: Legendary



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);
...

The following user says Thank You to cory for this post:
 
 
Elite Member
Dallas, TX/USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, CL
 
Posts: 49 since Aug 2013
Thanks: 55 given, 9 received


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
The following user says Thank You to KrazyTrader for this post:
 
 
Elite Member
Chicago, IL
 
Trading Experience: None
Platform: NT8,NT7,TWS,FOREX.COM app
Broker/Data: InteractiveBrokers, NinjaTrader Brokerage FOREX.COM, IQFeed
Favorite Futures: The one I'm creating in the present....ES, ZF, ZN, ZB, FX pairs
 
Blash's Avatar
 
Posts: 1,872 since Nov 2011
Thanks: 5,774 given, 3,285 received


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

It is an axiomatic fact that while you meditate you are speaking with your own spirit. In that state of mind you put certain questions to your spirit and the spirit answers: the light breaks forth and the reality is revealed.
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)
The following user says Thank You to Blash for this post:
 
 
the coin hunter
virginia
 
Trading Experience: Intermediate
Platform: ninja
Favorite Futures: NQ
 
cory's Avatar
 
Posts: 5,938 since Jun 2009
Thanks: 816 given, 7,616 received
Forum Reputation: Legendary

here is the code sample

Attached Files
Register to download File Type: cs BarsTrailingStop.cs (4.0 KB, 33 views)
The following 5 users say Thank You to cory for this post:
 
 
Elite Member
woodstock, ga
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, TF, CL
 
jwhtrades's Avatar
 
Posts: 162 since Feb 2011
Thanks: 666 given, 85 received

Thanks


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

The following user says Thank You to jwhtrades for this post:

 



futures io > > > > > Trailing Stop - 3 Bar
Thread Tools



Upcoming Webinars and Events (4:30PM ET unless noted)
 

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

Pro Trader vs Pro Athlete w/Brannigan Barrett @ Habitus Capital

Elite only
 

60 Minutes to Better Decisions & Better Trades w/Agustin Lebron

Elite only
 

Live Day Trading the E-MICROS w/Ilan @ Cannon (special time: 12PM ET)

May 30
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trailing stop based on previous bar high or low Guss NinjaTrader 7 April 5th, 2018 03:37 PM
NT8 Automated Trailing Stop at Low of HH bar help! KrazyTrader NinjaTrader Programming 1 May 13th, 2017 05:21 PM
Fee's For Stop Loss / Trailing Stop rkersh409 Reviews of Brokers and Data Feeds 3 May 29th, 2014 04:15 PM
Ninjatrader strategy for Trailing Stop and stop loss. skann NinjaTrader 2 August 20th, 2013 07:34 PM
Multicharts "Bar Magnifier + Trailing stop" Bulby EasyLanguage Programming 2 June 10th, 2010 06:11 AM


Tags
code, el, error, information, ninja, ninjascript, ninjatrader, sample, trailing stop, trial

All times are GMT -4. The time now is 05:33 AM. (this page content is cached, log in for real-time version)

Copyright © 2019 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432 WhatsApp Business, info@futures.io
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.
no new posts
Page generated 2019-05-22 in 0.21 seconds with 15 queries on phoenix