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


Trailing Stop - 3 Bar
Updated: Views / Replies:230 / 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

Reply
 
Thread Tools Search this Thread
 

Trailing Stop - 3 Bar

  #1 (permalink)
Elite Member
Dallas, TX/USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, CL
 
Posts: 48 since Aug 2013
Thanks: 54 given, 8 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
Reply With Quote
The following user says Thank You to KrazyTrader for this post:
 
  #2 (permalink)
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.

 
  #3 (permalink)
Market Wizard
virginia
 
Trading Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,836 since Jun 2009
Thanks: 781 given, 7,431 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);
...

Reply With Quote
The following user says Thank You to cory for this post:
 
  #4 (permalink)
Elite Member
Dallas, TX/USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, CL
 
Posts: 48 since Aug 2013
Thanks: 54 given, 8 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
Reply With Quote
The following user says Thank You to KrazyTrader for this post:
 
  #5 (permalink)
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,858 since Nov 2011
Thanks: 5,697 given, 3,230 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)
Reply With Quote
The following user says Thank You to Blash for this post:
 
  #6 (permalink)
Market Wizard
virginia
 
Trading Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,836 since Jun 2009
Thanks: 781 given, 7,431 received
Forum Reputation: Legendary

here is the code sample

Attached Files
Register to download File Type: cs BarsTrailingStop.cs (4.0 KB, 22 views)
Reply With Quote
The following 4 users say Thank You to cory for this post:
 
  #7 (permalink)
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: 661 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

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

Reply



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

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Journal Challenge $1600 in Prizes & Free Journalytix for all participants!

February
 

3 Excellent Entries, and How To Automate Them w/Kevin Davey

Feb 21
 

The Driving Force Behind the Market w/Earn2Trade

Mar 5
 

TBA w/Stage5 & iSystems

Mar 12
 

TBA w/John Grady @ No BS Day Trading

Mar 19
 

Day Trading Oil Futures: Reducing Risk & Increasing Profits w/DTN IQFeed

Mar 26
     

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


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

All times are GMT -4. The time now is 09:40 PM. (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-02-20 in 0.19 seconds with 14 queries on phoenix