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 max-td with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 MWinfrey with 1 posts (0 thanks)
    1. trending_up 2,798 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Exit using CCI Indicator

  #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?
Cheap historycal L1 data for stocks
Stocks and ETFs
MC PL editor upgrade
MultiCharts
Quant vue
Trading Reviews and Vendors
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
 
  #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,335


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


© 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