Flatten All Positions - NinjaTrader Programming | futures io social day trading
futures io futures trading

Flatten All Positions
Updated: Views / Replies:9,854 / 11
Created: by togier 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 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

Thread Tools Search this Thread

Flatten All Positions

  #11 (permalink)
Elite Member
Lagos, Nigeria
Futures Experience: Intermediate
Platform: NinjaTrader, SierraChart
Favorite Futures: Euro Currency & Oil
lolu's Avatar
Posts: 2,444 since Jun 2009
Thanks: 1,000 given, 1,598 received

NinjaTrader View Post
Correct, this is not supported and it's internal implementation can change at any time. That being said, this method will do the following as of this post:

- Cycle through each open connection
- Cycle through each account within the connection
- Terminate any running strategies on the account
- Cancel any active orders on the account
- Close any open position on the account

Is there a ChartTrader equivalent of "NinjaTrader.Gui.SuperDom.SuperDom.FlattenEverything()", and which is not a Strategy command call but a command call within an indicator script, even if unsupported ? A kinda "NinjaTrader.Gui.Chart.Chart.FlattenEverything()". Or, better still ..... what is the command script for the ChartTrader "Close" button trigger ?


Reply With Quote
  #12 (permalink)
Elite Member
Charlotte, NC/USA
Futures Experience: Advanced
Platform: NT, TOS
Broker/Data: Mirus/ZF, AMP/CQG, TOS, MBT
Favorite Futures: Futures, Stocks, Bonds, Forex
Posts: 36 since May 2011
Thanks: 56 given, 9 received

Strategy Time to exit all positions but leave in running...

shodson View Post
This will close your positions at 4:00pm

if (ToTime(Time[0]) >= 160000)

   if (
Position.MarketPosition == MarketPosition.Long)
   else if (
Position.MarketPosition == MarketPosition.Short)

If I implement this in a strategy, will it exit at a particular time in that Strategy and still allow it to run (the strategy)? Also, if I left the NT Flatten positions option checked (as a backup) to exit as well, will that still allow the strategy to keep running? Or, should one just use the above code in the Strategy and uncheck the NT Flatten positions? My goal is to close shortly before 4 pm est (say 30 seconds to a min before) and then have the strategy keep running but start back trading after 7 pm est. I already have the code for the time frames to enter the trades working perfectly...I just need it to exit at a certain time without turning off the Strategy...thank folks!

Reply With Quote


futures io > > > > > Flatten All Positions

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Wyckoff Hunting for Great Risk/Reward Ratio w/Gary Fullett

Elite only

Digging into the Details of iSystems w/Stage 5 & iSystems

Jun 5

Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing positions problem zury IB Trader Workstation 1 June 9th, 2011 12:29 PM
Half Of The Major Financial Regulatory Positions not filled kbit News and Current Events 0 May 19th, 2011 07:50 PM
Flatten All ? phyzfer NinjaTrader Programming 12 April 30th, 2011 11:37 AM
Account position: How to differentiate positions arjfca The Elite Circle 5 February 5th, 2011 02:27 PM

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

Copyright © 2018 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 2018-05-23 in 0.08 seconds with 23 queries on phoenix via your IP