CMI Pivots and Fibonacci for NT7 - Mike's version - NinjaTrader Programming | futures io social day trading
futures io futures trading


CMI Pivots and Fibonacci for NT7 - Mike's version
Updated: Views / Replies:6,367 / 12
Created: by Big Mike Attachments:10

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Closed Thread
 10  
 
Thread Tools Search this Thread
 

CMI Pivots and Fibonacci for NT7 - Mike's version

  #1 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,356 given, 83,237 received

CMI Pivots and Fibonacci for NT7 - Mike's version

When I switched to NT7 I couldn't find a CMI Pivots that worked natively, the latest version I found was 8.0.

So I just modified it to work with NT7 which wasn't hard, and then I modified it to give it the visual look I wanted and also add some features I wanted (added more levels). Screen shots below. There are two indicators at work here, the Weekly Pivots -- the only one I modified because it's the only one I use -- and the CurrentDay, which is also the one showing the Fibonacci levels and the yesterday high and low.

I have two problems with these.

1) They occasionally throw an exception. I can't show you the exception because it didn't happen today and I don't have a capture of it. But, the exception is in the Plot override, an out of index exception.

2) They do not auto-update as new day highs and lows are made.

In both cases, you can Ctrl-Shift-R to reload historical data in NT7 and get the chart to update. A simple F5 update doesn't work.

I could use some help!

a) Can you fix the exception? I've stared at it a bit too long, can't see it!
b) Can you fix the auto update?
c) I am pretty sure the original CMI allowed you to scroll back to prior chart days and the pivots would update as you did. I guess I broke that, probably part of problem 1 and 2, but can't figure out where/how I broke it.

Also, on occasion I have noticed the indicator will complain of "Insufficient historical data, load a longer chart period" or whatever the message is, even though I have 60 days of chart history (plenty for a weekly pivot). Sometimes Ctrl-Shift-R fixes it, sometimes I have to exit Ninja and reload. I am not sure if it's a Ninja bug or a CMI bug or a bug I introduced to the CMI code.

I trade CL only, so I set the number scaling to two digits. For 6E it will look funny probably. I also set the padding for two digits, so if trade ES the margin will be a bit off. You can change it in the code.

You'll want a right-margin of about 125 or 150 for these on your chart.

Attached. Please upload the fixes and share

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Attached Thumbnails
CMI Pivots and Fibonacci for NT7 - Mike's version-2-13-2010-1-55-02-am.png   CMI Pivots and Fibonacci for NT7 - Mike's version-2-13-2010-1-55-35-am.png   CMI Pivots and Fibonacci for NT7 - Mike's version-2-13-2010-1-56-41-am.png   CMI Pivots and Fibonacci for NT7 - Mike's version-2-13-2010-1-57-44-am.png  
Attached Files
Register to download File Type: cs CMIPivotsWeeklyV80.cs (61.7 KB, 165 views)
Register to download File Type: cs CMICurrentDayOHLV80.cs (51.6 KB, 154 views)
The following 4 users say Thank You to Big Mike for this post:
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 received


I think the reason you are getting the exception occasionally, is that internals of how custom Plots() are a little different. The problem is LastBarPainted and BarsPainted are no longer always consistent. So, the current code is referencing bars that don't exist.

You need to do something like the following:

int lastbar = Math.Min(Bars.Count - 1, ChartControl.LastBarPainted);
int barspainted = lastbar - ChartControl.FirstBarPainted;

and then use those vars instead of ChartControl vars. FirstBarPainted is the only one that seems ok.

Here is a Ninja post about it: Internal NT ChartControl Inconsistencies - NinjaTrader Support Forum

This is sorta/kinda in the NT7 code breaking changes doc.

Why NT would have vars in their objects that are not consistent is a whole other issue.

The following user says Thank You to aslan for this post:
 
  #4 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,356 given, 83,237 received

aslan/anyone,

I replaced the variables as you suggested (attached), unfortunately the error persists. Any other ideas?

My changes start on line 1264/1265 with the lastbar/barspainted, then I replaced all the instances of LastBarPainted and BarsPainted with them.

 
Code
1/18/2010 12:00:00 AM Bar = 5237: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.ArrayList.get_Item(Int32 index)
   at NinjaTrader.Data.MemBars.GetOpen(Int32 index)
   at NinjaTrader.Data.Bars.Get(Int32 index)
   at NinjaTrader.Indicator.CMICurrentDayOHL_V80.Plot(Graphics graphics, Rectangle bounds, Double min, Double max)
This one is driving me nuts.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Attached Files
Register to download File Type: cs CMICurrentDayOHLV80.cs (52.3 KB, 40 views)
 
  #5 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 received

I'll take a look today.

The following user says Thank You to aslan for this post:
 
  #6 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 received

Attached is an updated version of the indicator.

Changes:
* uncommented the pivot type parm to play with different types
* changed insufficent data checks, moved out of plot method

When I used this on NT7 B8, it was generally working. I looked thru your plot changes, and they all looked good, except one in the code that checks insufficent data (first bar time index should still be zero). I was not able to reproduce the exception when scrolling data.

For the auto-update on high/lows, they seem to work fine, but update at the end of the bar when CalcOnBarClose=true.

The scrolling back to prev days seemed to work fine as well. If you turn off autoscroll, you can see them correctly while you scroll back bar by bar.

The insufficent data checks were being checked in the Plot() method, so I moved them out to just check on the last bar of the chart. This may not be the intent of the original indicator.

The Plot() method could be cleaned up a bunch, but what is there is working.

Attached Files
Register to download File Type: cs CMICurrentDayOHLV80.cs (65.9 KB, 105 views)
The following 3 users say Thank You to aslan for this post:
 
  #7 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,356 given, 83,237 received

aslan,

Thanks! I will try it in the coming days, so far I couldn't get it to throw an exception.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

 
  #8 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary

Original CMIPivots adapted to NinjaTrader 7

Hi Mike,

this is my first post on your forum. Hello to everybody.

There is a new version of the session pivots indicator available for NinjaTrader 7 ( file attached), and I would appreciate, if you tested it.

Some changes with respect to CMIPivots

(1) Plot Override adapted to code breaking changes, so I have not had any plot errors for this version so far.
(2) Loading of daily bars modified to avoid deadlock, may take a few seconds to load.
(3) Indicator checks for daily data (does not plot, if not complete).
(4) The session is no longer defined via indicator panel, but via the NT7 session manager. This is crucial: garbage in-> garbage out.
(5) For day session HLC and pivots just reduce the session length but use the correct session close.
(6) You may enter holidays. If you enter February 15 as a holiday (day after President's day) the indicator takes into account that there was no settlement on February 15, but all trades were for trade date next day. So for both February 15 and 16, pivot values are calculated from Friday's HLC,. HLC will also be shown for the combined session of February 15 and 16, and pivots for February 17 will be calculated for the combined session. Could do this, because NT 7allows me to drop the session times from the indicator menu.
(7) I only use floor pivots, but the indicator has other formulae, including an option "Wide" for a different way to calculate R3, S3, R4 and S4.

There is one issue related to NT7: NT7 does not close the daily bar after the session end, but continues to update this with the last price traded. This nonsense only stops at midnight local time. So in DailyBars mode you will likely get false pivots between session close and midnight per your PC clock. After midnight you need to disconnect and reconnect before you can use DailyBars again. If you set the indicator to CalcFromIntradayData this will not happen. Sorry, this is a NinjaTrader bug, and the indicator should behave in an orderly manner, once NT 7 does.

Please feel free to report any bugs.

Attached Files
Register to download File Type: zip SessionPivotsV16.zip (36.9 KB, 179 views)
The following 8 users say Thank You to Fat Tails for this post:
 
  #9 (permalink)
Elite Member
belmont,ca
 
Futures Experience: Intermediate
Platform: ninja
Broker/Data: amp
Favorite Futures: es,nq,6b,6e,ym,tf
 
hoseman's Avatar
 
Posts: 16 since Jan 2010
Thanks: 31 given, 6 received

cci for nt

Hello mike I have been searching the forum for 2 days now and can't seem to find a cci pivots indicator for ninja like the one you use on your charts. I realize you use multicharts, but was hoping someone had a version for ninja. I looked at jeffs cci but it looks like the indicator has been removed. I enjoyed your last webinar by the way thank you for giving traders some great real advice.

The following user says Thank You to hoseman for this post:
 
  #10 (permalink)
Elite Member
Dallas, TX
 
Futures Experience: Beginner
Platform: Ninjatrader
Broker/Data: Zen-Fire
Favorite Futures: ZN, 6E
 
gulabv's Avatar
 
Posts: 284 since May 2010
Thanks: 159 given, 155 received


hoseman try this link https://futures.io/tradestation-multicharts-easylanguage-programming/3361-cci-pivot-zones-easylanguage.html#post52551

The following 2 users say Thank You to gulabv for this post:

Closed Thread



futures io > > > > > CMI Pivots and Fibonacci for NT7 - Mike's version

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
NT7 Toolbox for Floor Pivots Fat Tails The Elite Circle 311 May 29th, 2017 05:39 AM
Fibonacci, Elliott Waves, Pivots, Murrey Math trading Big Mike Traders Hideout 6 August 12th, 2014 02:28 AM
Help With CMI Pivots honkin NinjaTrader Programming 20 January 5th, 2011 08:10 AM
CMI Daily Pivots - another question Todd NinjaTrader Programming 3 January 22nd, 2010 05:53 PM
NT7 built-in Pivots not working fskidd NinjaTrader 2 December 27th, 2009 02:09 AM


All times are GMT -4. The time now is 03:29 AM.

Copyright © 2017 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
Page generated 2017-12-18 in 0.14 seconds with 20 queries on phoenix via your IP 54.163.209.109