HOW!!?? Turn SetStopLoss into a ExitLongLimit - NinjaTrader Programming | futures io | futures trading
futures io futures trading

HOW!!?? Turn SetStopLoss into a ExitLongLimit
Updated: Views / Replies:1,596 / 2
Created: by Trader.Jon Attachments:0

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 Search this Thread

HOW!!?? Turn SetStopLoss into a ExitLongLimit

  #1 (permalink)
Near the BEuTiFULL Horse Shoe
Trading Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
Trader.Jon's Avatar
Posts: 500 since Jul 2009
Thanks: 401 given, 183 received

HOW!!?? Turn SetStopLoss into a ExitLongLimit


I have (for me) intriguing idea after taking a long look ayt how the SetStopLoss was having my automated strategy trades finish: it looks like there could be another 3 or more ticks of profit available beyond what price was selected as the 'stop loss limit'.

I tried just adding another 3 ticks to the calculation I was using, with a small amount of success (ie same# of trades are taken, small increase in net points) but if I try to make the process into a ExitLongLimit the results are not fruitful (ie dont ask)

                //          Adjust TrailLong Exit
				double TRAILtickAdjustLONG = 0;
						if (  (BarsSinceEntry(0, "",0)) >= iTrailStartBarNum )
				{	 // Rule#1   flat for 3 bars in a row
					if(	iTrailUseTSr1 == 1	&& sTrailSS[0] == 1 && vTrailCt >= 3) 
					// Rule#2    flat for 2 bars in a row  
					if(	iTrailUseTSr2 == 1	&& sTrailSS[0] == 1 && vTrailCt >= 2)
					// Rule#3  TSST EXIT DOWNtrending
					if(	iTrailUseTSr3 == 1	&& sExitSS[0] == -1)
					// Rule#4  fast period EXITing EMA1 is in a DOWNslope
					if(	iTrailUseEMA1r4 == 1 && Falling(sExitMA1) )
					// Rule#5  slow period EXITing EMA2 is in a DOWNslope
					if(	iTrailUseEMA2r5  == 1	&& Falling(sExitMA2))
					// Rule#6  Filter UPslope > EMA3 UPslope 
					if(	iTrailUseK2EMA3r6 == 1	
                                                                                                && Rising(sTrailUKF) && sTrailUKF[0] > sTrailMA3[0]	
                                                                                                && Rising(sTrailMA3) )
					// Rule#7  EXITing KFilter is in a DOWNslope
					if(            iTrailUseUKFr7 == 1 && Falling(sExitUKF)) 
						tVars.cStopLossTicks -= TRAILtickAdjustLONG;
		// this is what I tried to substitute into the code line 'SetStopLoss( )' with horrible results
			//	if ( Lows[1][0] <=  (Position.AvgPrice - tVars.cStopLossTicks * vTickMult))
			//		ExitLongLimit( (Position.AvgPrice - tVars.cStopLossTicks * vTickMult) + 3*TickSize);
			SetStopLoss(CalculationMode.Ticks, tVars.cStopLossTicks * vTickMult + 3*TickSize);															
			DrawSquare(CurrentBar.ToString() + "sl", true, 0, Position.AvgPrice - tVars.cStopLossTicks * TickSize * vTickMult, Color.Crimson);
Any suggestions on how this can be coded effectively? My guess is that this may apply to several people that use SetStopLoss.


update: swapped out
 if ( Lows[1][0]
  if ( Low[0]
and looks more normal but still looking for ideas
more update: I started another thread on MIT / LIT ... I feel that the question posed in this thread will be in the same context as the other discussion

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!

Last edited by Trader.Jon; March 25th, 2011 at 02:24 PM.
Reply With Quote
  #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)
Site Administrator
Manta, Ecuador
Trading Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
Big Mike's Avatar
Posts: 47,779 since Jun 2009
Thanks: 30,462 given, 90,620 received

Sorry I am not following, maybe someone else will


Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member (see why)

Follow me on Twitter Visit my Facebook Visit my futures io Trade Journal Reply With Quote


futures io > > > > > HOW!!?? Turn SetStopLoss into a ExitLongLimit

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Right now

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now

Similar Threads
Thread Thread Starter Forum Replies Last Post
Markets To Turn Attention Back to Economy and Earnings Quick Summary News and Current Events 0 August 17th, 2011 12:10 AM
Students of 'Facebook Class' Turn Homework Into a Fortune Quick Summary News and Current Events 0 May 8th, 2011 01:40 PM
Mortgage Delinquencies Are Starting to Turn the Corner Quick Summary News and Current Events 0 February 17th, 2011 08:50 PM
How many have turn profitable because of a thread on BMT? jonc Psychology and Money Management 4 January 9th, 2011 06:17 AM
Question: Turn off indicator titles, info drago1 NinjaTrader Programming 3 April 7th, 2010 11:59 PM

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

Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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