Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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.
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.
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.
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.
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.