simple strategy to enter CCI cross +45/-45 - futures io
futures io



simple strategy to enter CCI cross +45/-45


Discussion in NinjaTrader

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




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

(If you already have an account, login at the top of the page)

 
Search this Thread
 

simple strategy to enter CCI cross +45/-45

(login for full post details)
  #1 (permalink)
 emini_Holy_Grail 
Dallas,TX
 
Experience: Intermediate
Platform: NinjaTrader, OpenQuant
Broker: Zaner/Zen Fire
Trading: ES,6E,6B,GC,CL
 
Posts: 598 since Nov 2009
Thanks: 176 given, 120 received

{
// Condition set 1
if (CrossAbove(Close, CCI(14), 1))
{
EnterLong(DefaultQuantity, "");
}

// Condition set 2
if (CrossBelow(Close, CCI(14), 1))
{
EnterShort(DefaultQuantity, "");
}
}

This is to make a simple strategy to enter Long when CCI cross a certain value like +45 or vice versa for -45. I believe this code will enter Long when CCI crosses zero? sorry guys I am brand new to coding, so need some help.
Any help is appreciated

Started this thread Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(82 thanks from 10 posts)
looks_twoDeetee’s DAX Trading Journal (time based)by Deetee
(25 thanks from 9 posts)
looks_3Salao's Journalby Salao
(23 thanks from 6 posts)
looks_4Learning to Profit - A journey in algorithms and optionsby Syntax
(12 thanks from 7 posts)
looks_5Maybe a little bit different journalby Malykubo
(3 thanks from 2 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
futures io site changelog and issues/problem reporting
73 thanks
The Crude Dude Oil Trading System
73 thanks
Would You Sell Your System?
71 thanks
FIO Journal Challenge - April 2021 w/Jigsaw Trading
32 thanks
Big Mike in Ecuador
25 thanks
 
(login for full post details)
  #3 (permalink)
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,215 given, 2,083 received



emini_Holy_Grail View Post
{
// Condition set 1
if (CrossAbove(Close, CCI(14), 1))
{
EnterLong(DefaultQuantity, "");
}

// Condition set 2
if (CrossBelow(Close, CCI(14), 1))
{
EnterShort(DefaultQuantity, "");
}
}

This is to make a simple strategy to enter Long when CCI cross a certain value like +45 or vice versa for -45. I believe this code will enter Long when CCI crosses zero? sorry guys I am brand new to coding, so need some help.
Any help is appreciated

Hi,

You forgot to set the numeric value of your CCI

protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if (CrossAbove(CCI(14), 45, 1))
{
EnterLong(DefaultQuantity,
"");
}
}

For such strategy you better use the NT strategy wizard once you have finished you can unlock the code and modify it

Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to redratsal for this post:
 
(login for full post details)
  #4 (permalink)
 emini_Holy_Grail 
Dallas,TX
 
Experience: Intermediate
Platform: NinjaTrader, OpenQuant
Broker: Zaner/Zen Fire
Trading: ES,6E,6B,GC,CL
 
Posts: 598 since Nov 2009
Thanks: 176 given, 120 received

redratsal

Thks and will try it, but is my logic correct?

I gave pirce close crossabove and below CCI value,(unlike price close > EMA 20) etc, but in this case it is not price in the CCI panel. would you mind verify that for me

Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,215 given, 2,083 received


emini_Holy_Grail View Post
redratsal

Thks and will try it, but is my logic correct?

I gave pirce close crossabove and below CCI value,(unlike price close > EMA 20) etc, but in this case it is not price in the CCI panel. would you mind verify that for me

The script refet to price close: if the bar[0] crossabove the level 45 of your CCI than enter long.
Since I am using a cross strategy in "the battle of the bot" thread you can download it and use it as an example.

Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to redratsal for this post:
 
(login for full post details)
  #6 (permalink)
 emini_Holy_Grail 
Dallas,TX
 
Experience: Intermediate
Platform: NinjaTrader, OpenQuant
Broker: Zaner/Zen Fire
Trading: ES,6E,6B,GC,CL
 
Posts: 598 since Nov 2009
Thanks: 176 given, 120 received

Thks and let me check out there

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > simple strategy to enter CCI cross +45/-45


Last Updated on January 8, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1,800 in prizes!

April
 

Seven Trading Mistakes Solved With Smart Trading Tools w/Brannigan Barrett

Elite only
     



Copyright © 2021 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