Stop Close Only Ninjatrader - NinjaTrader Programming | futures io social day trading
futures io futures trading


Stop Close Only Ninjatrader
Updated: Views / Replies:452 / 3
Created: by cruelGlad 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 90,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
 

Stop Close Only Ninjatrader

  #1 (permalink)
Elite Member
TORONTO CANADA
 
Futures Experience: None
Platform: NT
Favorite Futures: ES
 
Posts: 10 since Jan 2014
Thanks: 4 given, 0 received

Stop Close Only Ninjatrader

Hi guys, I'd like to implement stop close only order in ninjatrader and was wondering if anyone has done this already and would care to share a few bits of code/info. I'm new to ninjatrader and the only sensible way I could think of is to implement a variable which tracks the stop and in OnBarUpdate() if the close falls below (for long positions) and above (for short positions) exit the position immediately. I know there is probably a better way of doing this with perhaps simulated stops. Does anyone have any experience with this?

Please help !

Thanks in advance.

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)
Elliott Wave Trader
Denver
 
Futures Experience: Intermediate
Platform: TOS, TDA StrategyDesk
Broker/Data: TD Ameritrade
Favorite Futures: equities,options
 
deefster's Avatar
 
Posts: 14 since Dec 2009
Thanks: 10 given, 9 received


Seems to me if you have CalculateOnBarClose = true, such as in Initialize(), then you can simply just refer to the prior close to meet your criteria. Take a look at some of the sample strategies, but I'm thinking something like below should work, obviously do some paper trades before trying anything live.

 
Code
#region Variables
private IOrder entryOrder = null; // variable used to track order status
private IOrder exitOrder = null; // variable used to track order status
private double PainLevel = 10*TickSize;

In OnBarUpdate()

 
Code
if (your_entrycondition) {
 entryOrder = EnterLong();
}

if (entryOrder.OrderState == OrderState.Filled && CrossBelow(close[1], entryOrder.AvgFillPrice - PainLevel,1))
{
  exitOrder = ExitLong();
}

Reply With Quote
The following user says Thank You to deefster for this post:
 
  #4 (permalink)
Elite Member
TORONTO CANADA
 
Futures Experience: None
Platform: NT
Favorite Futures: ES
 
Posts: 10 since Jan 2014
Thanks: 4 given, 0 received

Thanks deefster. It makes sense now. I incorporated your suggestions into Ninjatrader's SampleOnOrderUpdate strategy so as to create a strategy which initially uses a stop close only order.

I've attached it so you or others can use/modify at their leisure. You are welcome to give any suggestions for improvement as you see fit.

Cheers.

Attached Files
Register to download File Type: zip SCO.zip (4.1 KB, 12 views)
Reply With Quote

Reply



futures io > > > > > Stop Close Only Ninjatrader

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ninjatrader strategy for Trailing Stop and stop loss. skann NinjaTrader 2 August 20th, 2013 08:34 PM
Exit at close for trailing stop strategy skorpyo ThinkOrSwim Programming 0 July 27th, 2013 05:56 AM
Ninja Close Position / Close Button / ChartTrader vantojo NinjaTrader Programming 1 October 15th, 2012 06:51 PM
Volume Stop NinjaTrader Indicator sunny135 NinjaTrader 2 February 28th, 2011 01:54 AM
Indicator forcing NinjaTrader to close / shutdown dsraider NinjaTrader Programming 14 July 27th, 2010 08:09 AM


All times are GMT -4. The time now is 10:56 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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 2017-12-11 in 0.09 seconds with 20 queries on phoenix via your IP 54.145.16.43