Trailing Stop Loss and Reverse - NinjaTrader Programming | futures io social day trading
futures io futures trading

Trailing Stop Loss and Reverse
Updated: Views / Replies:3,569 / 3
Created: by shergenr 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

Trailing Stop Loss and Reverse

Just starting out...
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: ES
Posts: 3 since Jan 2011
Thanks: 0 given, 0 received

Trailing Stop Loss and Reverse

I'm not a programmer, but have some skills in this area and have been helping a trader develop a custom indicator and now I am trying to hook it up to an automated strategy to backtest it. The strategy reverses in one of two ways: (1) a signal is violated during a bar and an order to reverse is submitted (EnterLong/Short @ market) the next day or (2) the bar moves through a stop loss point and triggers a stop and reverse (these are typically 5-10 ticks from our signals). Along the way, the stop loss price gets modified as the trend lengthens.

I have been advised to use unmanaged orders and now (by ninja support) quasi-managed orders (highly overloaded and provided an orderid ...e.g., .stopLoss = EnterLongStop(.........). Within OnBarUpdate I am evaluating incoming bars against my indicator values and trading rules and enter a first position, reverse a position, or amend a stop/reverse order. I am creating the stop/reverse order in OnExecutionUpdate. I have some processing going on in OnOrderUpdate (primarily setting orderids to null for unfilled or cancelled orders).

Everything seems to work through the first pair of EnterLong or EnterShort and EnterShort/LongStops, after that first entry and reverse everything seems to fall apart. The tendency is to get gaps where for some reason instead of exiting the position and reentering in the other direction, it simply exits.... Does anyone have any suggestions for coding this? Should I go back to coding unmanaged order entries? Any advice?

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.

Site Administrator
Manta, Ecuador
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
Big Mike's Avatar
Posts: 46,420 since Jun 2009
Thanks: 29,509 given, 84,370 received

Unmanaged orders == major experience required.

If you truly need unmanaged orders, you would probably benefit from hiring the strategy done by an experienced NT programmer. Then if you want to learn to program, you can use this as a foundation going forward.


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.

Just starting out...
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: ES
Posts: 3 since Jan 2011
Thanks: 0 given, 0 received

Thanks Mike. Yes the thought of boot-strapping had occured to me as I have used it often. In fact, my plan was to get the backtesting done and then sub it out for the automated trading. I was hoping that the real complexity of unmanaged orders lies in the error and message trapping required for automated trading and not the mere submission of orders into a historical backtest.

Since I had been advised by NT Support that alternatively either managed or unmanaged orders would work, I was hoping that someone could confirm which was really true.


futures io > > > > > Trailing Stop Loss and Reverse
Thread Tools

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

July Journal Challenge - $500 in Amazon Gift Cards!


Current Events in Commodity Markets: Influence & Crowd Psychology w/IQFeed

Jul 12

AXESS Trader: Powerful cloud Based Trading Platform w/GFF Brokers

Jul 17

TBA: FuturesTrader71 w/Morad Askar

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trailing stop following an indicator nanobiotech NinjaTrader Programming 9 October 3rd, 2011 09:50 AM
trailing stop à la LeBeau kiasom EasyLanguage Programming 4 May 13th, 2011 05:13 PM
Stop and Reverse MWinfrey NinjaTrader Programming 2 January 25th, 2011 07:02 AM
"Stop If Bid" command for entry's and stop loss arjfca EasyLanguage Programming 4 October 7th, 2010 05:05 PM
Trailing stop loss kavin729 NinjaTrader Programming 1 August 20th, 2010 01:17 PM

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

Copyright © 2018 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
Page generated 2018-07-12 in 0.09 seconds with 14 queries on phoenix