stoploss to breakeven to trailing (Page 2) - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

stoploss to breakeven to trailing
Started:December 16th, 2009 (09:55 AM) by stephenszpak Views / Replies:5,919 / 13
Last Reply:October 13th, 2014 (03:30 PM) Attachments:2

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

stoploss to breakeven to trailing

Old March 16th, 2010, 12:17 AM   #11 (permalink)
Elite Member
Madison, WI
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
aslan's Avatar
Posts: 613 since Jan 2010
Thanks: 339 given, 1,056 received

Here are a couple of items to try:

* limit your data set (i.e. specific day or less) to help cut down on the amount of info to sift thru when debugging

* use set TraceOrders = true in Initialize() in order to see all order actions in Ninja in the output window, this combined with your own prints should help you figure out where your looping is coming from.

* make sure you are doing compare of price values correctly, Close[0] > lastPrice does not cut it when comparing double values. Just comparing values works most of the time, but you really need to use the following: Instrument.MasterInstrument.Compare() - see help. I hate needing this, and I usually leave it out until I get to the final code and then add it in. If you have a comparison that you think should trigger this could be it.

Hope this gives you some ideas.

Reply With Quote
The following 2 users say Thank You to aslan for this post:

Old March 20th, 2010, 02:25 PM   #12 (permalink)
Elite Member
Massachusetts (USA)
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: YM
stephenszpak's Avatar
Posts: 778 since Jun 2009
Thanks: 144 given, 356 received

Not doing much regarding a system these days. I do thank you all though,
Beth, cory, and Aslan.

P.S. Beth, I did come across a programmer that seems to be very knowledgeable,
should you need his name someday.

- Stephen

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

Old October 13th, 2014, 11:21 AM   #13 (permalink)
Elite Member
New York
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: options
Posts: 28 since Feb 2014
Thanks: 62 given, 36 received

wgreenie View Post
Hi Stephen

I also tried for weeks to have a trail code "functioning" in my strategies. Can certainly understand the stress and frustration when days and nights were spent and nothing seemed working.

Just got the enclosed sample and hope it may help you. Good Luck!


Wow, this script right here is exactly why I joined the elite (formerly BMT) section. Super thanks, I know its 4 years later but NT is still the leader!

Reply With Quote

Old October 13th, 2014, 03:30 PM   #14 (permalink)
Cambridge, Ontario
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Zen-Fire
Favorite Futures: 6E
Posts: 1,773 since Dec 2009
Thanks: 1,258 given, 1,194 received

Yes Stephen. NT Support Forum is extremely important/helpful for my learning. You can also email the NT support team directly for any issues you may have.

Good Trading is about Trading Right!
Want What the Market Wants!
Trade With the Trend!
Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > stoploss to breakeven to trailing

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
StopLoss as fraction of ATR FArias NinjaTrader Programming 5 February 23rd, 2011 02:45 PM
Stops, trailing and breakeven stops jonc NinjaTrader 4 November 9th, 2010 12:06 AM
Help Coding Trailing stoploss in Strategy Darshiit NinjaTrader Programming 3 June 25th, 2010 09:45 AM
Runner Breakeven re entry emini_Holy_Grail Psychology and Money Management 6 May 1st, 2010 08:48 AM
BREAKEVEN + ONE TICK rajafx1 NinjaTrader Programming 1 November 8th, 2009 05:37 PM

All times are GMT -4. The time now is 05:34 AM.

Copyright © 2016 by 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 2016-10-26 in 0.08 seconds with 20 queries on phoenix via your IP