I'm attaching one new indicator I'm attempting to use with Chart Control. If you scroll back through the chart, you'll see the colors change with what I'm assuming is the current screen's right edge data.
Unfortunately, it's not performing like I expect for some of the current info from the other bararrays.
This is based on the SMAFromRangeBars. I changed SMA to EMA and RangeBars to minute bars and added another BarsInProgress array.
I'd appreciate if anyone could help me modify this to provide correct data to the graphic colors. I've seen some instances where the color of the dot should be red but it's green or should be green but it's red. Any other simple examples with chart control would be highly appreciated.
On a future version, I'll be adding labels to the graphic.
I forgot to mention, I found a TRO SM (Slot Machine) Compass indicator that was ported to NT by cvax that I've used as the basis for the Chart Control portion of the code (chart attached). Just changed colors, types and pixel locations of the graphics.
I'm trying to combine mutiple timeframe information to one chart (the fastest). For this first test I'm using minute bars.
The top three dots are supposed to give the crossover or condition of an EMA13 vs EMA21. Green for above and Red for below. The top is for 9 minute chart, second is 3 minute chart, and third is 1 minute chart. If they all agree, the fourth dot color will be the same color, otherwise it's gold.
The upper right arrows shows relation of an HMA7 vs an EMA7 on the one minute chart. The bottom arrow shows direction of the HMA7 on a one min chart.
I've seen sometimes the dots seem to be the wrong color almost as if it's a repainting type of issue. Or maybe I've just got a bug that hasn't been found yet.
I normally put the colored line plots to transparent so there's not too much data on the chart.
It will plot on a range chart so I'll be testing the other bar arrays as higher range settings.
Mainly, I'm looking for any help with any ChartControl syntax that could improve this code. I saw Shodson put up some sample syntax for Chart Control so I'll be going through that.
Last edited by zeller4; April 20th, 2011 at 08:22 AM.
This drove me mad the last time I tried to get into Ninja..glad to see it makes more sense now in 7. I'm not sure this will help but I spent so long trying to figure out those getX/Y functions, maybe someone else will see this in the future.
int barPaintWidth = base.ChartControl.ChartStyle.GetBarPaintWidth(base.ChartControl.BarWidth);
int lastX = ChartControl.GetXByBarIdx(BarsArray, CurrentBar);
int lastY = ChartControl.GetYByValue(this,Close);