NexusFi: Find Your Edge


Home Menu

 





Looking for NT7 CCI Indicator based on EMA and not SMA


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Zondor with 9 posts (33 thanks)
    2. looks_two Silvester17 with 6 posts (17 thanks)
    3. looks_3 wldman with 5 posts (6 thanks)
    4. looks_4 Big Mike with 4 posts (2 thanks)
      Best Posters
    1. looks_one aligator with 4 thanks per post
    2. looks_two Zondor with 3.7 thanks per post
    3. looks_3 Silvester17 with 2.8 thanks per post
    4. looks_4 wldman with 1.2 thanks per post
    1. trending_up 12,371 views
    2. thumb_up 70 thanks given
    3. group 6 followers
    1. forum 29 posts
    2. attach_file 10 attachments




 
Search this Thread

Looking for NT7 CCI Indicator based on EMA and not SMA

  #11 (permalink)
 
ThatManFromTexas's Avatar
 ThatManFromTexas 
Houston,Tx
 
Experience: Advanced
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: TF
Posts: 2,265 since Feb 2010
Thanks Given: 1,206
Thanks Received: 4,355


Zondor View Post
If some of you guys would think about the changes I make and start using those techniques in your code, my sarcastic tone would miraculously change to one of sweetness. There is a thread regarding optimization of C# code that hasn't been very active lately, but I consider it to be very important. Unless you never use any indicators.

Where can I find the Winfrey Adaptive CCI?

@Zondor

For those of us who have no formal training in programming and learned to write indicators by hacking on indicators included with NinjaTrader .... we know what we do is not cutting edge ... and we make no pretense otherwise .... but for many trader's requests on futures.io (formerly BMT) ... they work well enough to get the job done ... think of us as the WalMart of custom programming ... we make indicators available to the masses....

No one disputes that your code is very efficient ... difficult to follow for the uneducated ... but efficient ... and Gawd knows.... NinjaTrader needs all the help it can get ... but the problem is not with your code... it's your delivery

I got Zondor'd when I posted a re-worked NT indicator and you posted a dire Warning that no one should download such an inefficient indicator for fear it would cause their machines to grind to a halt ... even though ... to this day it runs fine without incident

That's like :

Innocent Bystander: I need a car to drive back and forth to work but I can't afford to buy one.

TMFT: I have an old car you can have. It's not fancy but it starts and runs and will get you to work and back.

Zondor: Don't drive that car... it doesn't get good enough gas mileage .


I have rewritten my personal indicators with the sample code you sent me .... it works well and I have learned a lot from reading your code ... but had it not been for @Fat Tails support ... I probably would have quit posting indicators altogether after that...

You have a good message ... but you could stand a more efficient way of communicating it...

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Cheap historycal L1 data for stocks
Stocks and ETFs
Quant vue
Trading Reviews and Vendors
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #12 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,661


ThatManFromTexas View Post
Innocent Bystander: I need a car to drive back and forth to work but I can't afford to buy one.

TMFT: I have an old car you can have. It's not fancy but it starts and runs and will get you to work and back.

Zondor: Don't drive that car... it doesn't get good enough gas mileage .

Found this quite funny, and I fixed it for you here:

Zondor: Don't drive that car... it doesn't get good enough gas mileage. And god will kill a kitten for every mile you drive in it.

Some indicators are quite terrible and can even crash NinjaTrader. But "most" indicators are "ok". Still, optimization is a good and noble goal, especially if you are going to use any of them in NT's backtester.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #13 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,533 since Aug 2011
Thanks Given: 2,066
Thanks Received: 9,556


I've included the acci version I use.

Attached Files
Elite Membership required to download: Adaptive_CCI.cs
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #14 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,661

You should mention @MWinfrey to grab his attention.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #15 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

The version linked by Widman in post 13 is the one with lots of unnecessary arithmetic that I updated in post 10. I just updated it again to correct a minor error (detrender was not being updated on every tick) and to reduce the number of cycles through the OnBarUpdate block by about 70% on average with COBC false, but I can't seem to edit post 10 anymore. So here it is.

The adaptive cci makes calls to the alternate adaptive cci, which had the same problem of doing on every tick arithmetic that only needs to be done once per bar. So I cleaned that up too. I think. For posterity reasons.

The following italicized statment was NOT CORRECT ! Cannot use predefined reusable instances for the calls to adaptive alternate cci because the parameters keep changing. This would have to be dealt with by incorporating the alternate cci code inside the adaptive cci code. That would be a nice coding project... for someone else.

The car mileage analogy is folksy and cute but not very appropriate. With typical badly coded indicators it's more like driving 500 miles to go across the street. Because the time scale is that of the computer clock you don't really notice it until there are enough indicators and charts to have a severe impact, or fast market conditions make the charts stop and lag. Of course, nobody should be using indicators anyway. Or charts for that matter.

I don't have any "formal training" and am not a professional programmer, have freely shared information about optimization techniques..... feel free to ignore my advice and use the "legacy" versions.

BTW, the adaptive CCI is not something I would be likely to use in my trading, so I updated it just for fun.

I hope everyone is enjoying today's market crashette.

NEW! I made additional changes which will FURTHER reduce CPU load AND memory consumption. Uploaded at 1:13 AM ET on October 23, I think.


It turned out that I COULD use reusable instances of the external Adaptive_Alternate_CCI. There were a couple of loops executing on every tick that only need to run once per bar. The internal arithmetic was changed from double precision to single precison because that is much cheaper to run and gives 7 significant digits, which are enough. The ten digit precision of the double precision numbers exceeds the precision of the output data so is spurious and unnecessary. Refer to SIGNIFICANT DIGITS

Latest version uploaded at 2:53 AM Oct 23. Previous version went just a little too far and did not work correctly on real time bars!

Attached Files
Elite Membership required to download: Adaptive_Alternate_CCI.cs
Elite Membership required to download: Adaptive_CCI.cs
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #16 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

Please refer to preceding post.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #17 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,533 since Aug 2011
Thanks Given: 2,066
Thanks Received: 9,556

working on that @Zondor. I will check out the revisions as soon as I can.

Visit my NexusFi Trade Journal Reply With Quote
  #18 (permalink)
 
ThatManFromTexas's Avatar
 ThatManFromTexas 
Houston,Tx
 
Experience: Advanced
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: TF
Posts: 2,265 since Feb 2010
Thanks Given: 1,206
Thanks Received: 4,355


Zondor View Post
The car mileage analogy is folksy and cute but not very appropriate. With typical badly coded indicators it's more like driving 500 miles to go across the street. Because the time scale is that of the computer clock you don't really notice it until there are enough indicators and charts to have a severe impact, or fast market conditions make the charts stop and lag. Of course, nobody should be using indicators anyway. Or charts for that matter.

I don't have any "formal training" and am not a professional programmer, have freely shared information about optimization techniques..... feel free to ignore my advice and use the "legacy" versions.

@Zondor

... folksy and cute but inappropriate .... I hear that a lot.... Wait ... Who am I kidding.... I have never been accused of being cute....

I appreciate your contributions ..... I have learned a lot from your reading your code ... I have re-written my personal indicators from your examples ... and just so you know... being "Zondor'd is considered a badge of honor....

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
Thanked by:
  #19 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

Looks like the car has a bad bearing and will need to be checked and revised.
Be patient! I may need to order some parts.

In the meantime, would be interested to hear from anyone who actually makes money using this indicator.

And most definitely from anyone who might wish to look for the errors, since this is would be a nice cooperative volunteer open source project.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #20 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731


I will add the version of ema cci in post 3 to backlog of jalopies to be inspected.

The code is out there for anyone who wants to look for the mistakes.. undoubtedly something careless. Or carless.

"I thought the gas pedal was the brake pedal..."

Just saw next post.. never mind. No problem.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on March 29, 2016


© 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