NexusFi: Find Your Edge


Home Menu

 





Global Stop


Discussion in NinjaTrader

Updated
    1. trending_up 1,415 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Global Stop

  #1 (permalink)
nourozi
New Zealand
 
Posts: 92 since Jun 2013
Thanks Given: 52
Thanks Received: 30

Hi there,

Is there a way to auto flatten all positions in Ninjatrader once the account reaches a certain amount of drawdown? Preferrably combining unrealized and realized pnl.

For example, my max drawdown is -$800 and I would like to flatten all positions once the realized + unrealized pnl is -$800 or greater.

Thanks,

Erfan.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Futures True Range Report
The Elite Circle
Exit Strategy
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
65 thanks
Funded Trader platforms
41 thanks
Battlestations: Show us your trading desks!
29 thanks
NexusFi site changelog and issues/problem reporting
23 thanks
The Program
19 thanks

  #2 (permalink)
 
sands's Avatar
 sands 
London + UK
 
Experience: Advanced
Platform: Proprietary Analytics
Broker: Multiple broker + Multiple feed
Trading: Currently European and US equities
Posts: 443 since Dec 2013
Thanks Given: 257
Thanks Received: 234

I don't believe that this is possible, however you can programatically exit positions by contract.

Hope that helps.

Reply With Quote
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,824
Thanks Received: 4,629



sands View Post
I don't believe that this is possible, however you can programatically exit positions by contract.

Hope that helps.

All is possible in C#, but the question is not clear enough. The answer will be different if it's in a strategy or discretionary.
You can, for example :
- use NinjaTrader.Cbi.Globals.Accounts[].Executions to compute your P&L and unrealized P&L (with an OnPositionUpdate());
- write your last P&L in a flat file, and let a strategy read this file and do what needs to be done;
- read the Ninja database to compute the P&L for the day (or since X hours, ...).

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
Thanked by:





Last Updated on March 5, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts