Learning Chart Control Programming - NinjaTrader Programming | futures io social day trading
futures io futures trading


Learning Chart Control Programming
Updated: Views / Replies:3,788 / 7
Created: by zeller4 Attachments:3

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

Reply
 
Thread Tools Search this Thread
 

Learning Chart Control Programming

  #1 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,359 given, 383 received

Learning Chart Control Programming

Hello All,

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.

Best Regards,

Kirk

Attached Thumbnails
Learning Chart Control Programming-6e-06-11-1-min-4_19_2011.jpg  
Attached Files
Register to download File Type: zip EMAs_1_3_9_v01.zip (12.9 KB, 55 views)
Reply With Quote
 
  #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
Milan (I)
 
Futures Experience: Advanced
Platform: Ninjatrader
Broker/Data: Kinetick
Favorite Futures: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,217 given, 2,067 received



zeller4 View Post
Hello All,

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.

Best Regards,

Kirk

Hello Kirk,

Have you checked this thread https://futures.io/elite-circle/9506-cursor-state.html#post114482, you might find what you were looking for in the cursor state script.

Reply With Quote
 
  #4 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,359 given, 383 received

thanks redratsal,

I'm sure there's a few things to learn from that code so I'll be delving into it deeper. It's not exactly what I'm looking for at the moment but I appreciate it.

kz

Reply With Quote
 
  #5 (permalink)
Elite Member
Bala, PA, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus, IB
Favorite Futures: SPY, Oil, Euro
 
monpere's Avatar
 
Posts: 1,858 since Jul 2010
Thanks: 300 given, 3,276 received


zeller4 View Post
Hello All,

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.

Best Regards,

Kirk

Can you explain what is the indicator is suppose to do? Maybe some people can give you some ideas on how to approach it.

Reply With Quote
 
  #6 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,359 given, 383 received

Hey monpere,

Good point.

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.

kz

Attached Thumbnails
Learning Chart Control Programming-6e-06-11-1-min-4_20_2011.jpg  

Last edited by zeller4; April 20th, 2011 at 09:22 AM.
Reply With Quote
 
  #7 (permalink)
Membership Temporarily Revoked
NYC
 
Futures Experience: None
Platform: graph paper and pencil
Favorite Futures: harp
 
dutchbookmaker's Avatar
 
Posts: 187 since Dec 2010
Thanks: 9 given, 107 received

Hah, you hack like me with a million lines commented out.
Thanks for this, I'm starting to try to learn chart control and it is such a pain.

This thread has some good stuff in it if you haven't seen it
How do you convert Price to Y axis values? - NinjaTrader Support Forum

Reply With Quote
The following user says Thank You to dutchbookmaker for this post:
 
  #8 (permalink)
Membership Temporarily Revoked
NYC
 
Futures Experience: None
Platform: graph paper and pencil
Favorite Futures: harp
 
dutchbookmaker's Avatar
 
Posts: 187 since Dec 2010
Thanks: 9 given, 107 received

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[0], CurrentBar);
int lastY = ChartControl.GetYByValue(this,Close[0]);

graphics.DrawRectangle(new Pen(Color.Black), lastX,lastY, barPaintWidth, barPaintWidth);

Reply With Quote
The following 2 users say Thank You to dutchbookmaker for this post:

Reply



futures io > > > > > Learning Chart Control Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Programming (programming without coding) LukeGeniol Platforms and Indicators 11 September 16th, 2016 01:49 PM
Best way to start learning ninjatrader programming ionos777 NinjaTrader Programming 17 April 24th, 2014 05:53 PM
Learning how to play guitar...reminds me of learning how to trade shodson Beginners and Introductions 10 September 16th, 2013 06:22 PM
Ninja script - learning code + programming alias NinjaTrader Programming 20 May 11th, 2011 06:01 AM
Control thyself itrade2win Psychology and Money Management 8 November 21st, 2010 07:46 PM


All times are GMT -4. The time now is 04:07 PM.

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-12 in 0.10 seconds with 20 queries on phoenix via your IP 54.163.210.170