NexusFi: Find Your Edge


Home Menu

 





Exit using CCI Indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one kian123 with 2 posts (0 thanks)
    2. looks_two MWinfrey with 1 posts (0 thanks)
    3. looks_3 max-td with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,394 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
kian123
florida
 
Posts: 2 since Nov 2010
Thanks Given: 1
Thanks Received: 0

Hello All,

I am new here and to programming,

I was wondering if anyone could help me with the following:

Why the following code is not getting me out of my long trades on NT6.5?

// Condition set 2
if (CrossBelow(CCI(Exitcci), 100, 1)
&& Position.MarketPosition == MarketPosition.Long)

Any advise is appricated!!


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
Thanks Mike. Godspeed.
The Elite Circle
Daytrading to swingtrading
Traders Hideout
Would a node-based workflow for automated trading be useful?
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
  #3 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927


hi kian123,
with such a little snippet its not possible to say why your code is not workling.

if you want to increase the chance of good + senseful answers you have to post your whole code, or more than this little piece.

its not because of wanting your code but this snippet must also be checked in its relation to the rest of the code i think.


max-td
Reply With Quote
  #4 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,337


kian123 View Post
Hello All,

I am new here and to programming,

I was wondering if anyone could help me with the following:

Why the following code is not getting me out of my long trades on NT6.5?

// Condition set 2
if (CrossBelow(CCI(Exitcci), 100, 1)
&& Position.MarketPosition == MarketPosition.Long)

Any advise is appricated!!

Add the following to you conditional

ExitLong();


Reply With Quote
  #5 (permalink)
kian123
florida
 
Posts: 2 since Nov 2010
Thanks Given: 1
Thanks Received: 0


MWinfrey View Post
Add the following to you conditional

ExitLong();


I found the problem..

You are right I needed to add ExitLong() which I did have but it does not show in the formula I posted


I also add name the exit which I found out that the entery should be named the same so the system know which trade to exit, and I had not name the entry.

Thanks for all your replies!!


Reply With Quote




Last Updated on November 17, 2010


© 2026 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 - Downloads - Top
no new posts