Explanation somewhere on creating custom plots with colors etc...... - NinjaTrader Programming | futures io social day trading
futures io futures trading


Explanation somewhere on creating custom plots with colors etc......
Updated: Views / Replies:3,687 / 13
Created: by forrestang Attachments:6

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
 6  
 
Thread Tools Search this Thread
 

Explanation somewhere on creating custom plots with colors etc......

  #1 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

Explanation somewhere on creating custom plots with colors etc......

You guys know that function sometimes used near the bottom of scripts, under properties for creating graphics on a chart..... Usually starts like this:
 
Code
public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)
Ninja says they don't support this, so they probably don't have a write up on it anywhere. I guess its about time I figure that out.

But do you guys know of an explanation somewhere on how to create that block, and how it works?

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)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,215 since Jun 2009
Thanks: 628 given, 6,311 received


some primers
https://futures.io/ninjatrader-programming/6759-plotting-text-indicator-panel.html#post77752

Reply With Quote
The following 2 users say Thank You to cory for this post:
 
  #4 (permalink)
Elite Member
Milan Italy
 
Futures Experience: Intermediate
Platform: Ninjatrader, Sierra Chart
Favorite Futures: ES
 
Posts: 523 since Feb 2010
Thanks: 470 given, 629 received

NT doesn't support it, but somewhere on the site they have an example of custom plotting posted. (I don't have it any more, but it's probably called something like "SampleCustomPlotMethod"). Otherwise, your best bet is just to look at some of the indicators others have uploaded.

Reply With Quote
The following user says Thank You to futuretrader for this post:
 
  #5 (permalink)
 Vendor: www.edevaay.com 
Al,India
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: RKG
Favorite Futures: NiftyFuture
 
devdas's Avatar
 
Posts: 1,547 since Feb 2010
Thanks: 1,460 given, 1,661 received

It provides a context to draw custom drawings through a Graphics object that "tied to" or "points to" the panel on which indicator will be applied. However its uses are certainely wide...but you can start doing simple experiments with drawing some lines and other shapes with function avalibale with graphics object. Just type
"graphics." and intellisence will show available methods for use.

similarly bounds will occupy the rectangular space of panel in which indicator will be applied...and hence mostly represent dimensions in screen pixels....just type "bounds." and get availble methods.

Lastly min and max represnt the minimum and maximum values of vertical scale of indicator panel in which indicator is applied. If none of plot containing dataseries exisit in indicator then these min and max will be nearly 0 and 1.

For your example i hv created a small script, it only draws a rectangle and then draws a string in that
showing scales minimum and maximum values. Just put indicator one by one in price panel and seperate panel and see how it behaves on scrolling chart/changing scale etc.

Harvest The Moon
Nest The Market
Attached Thumbnails
Explanation somewhere on creating custom plots with colors etc......-myexp.png  
Attached Files
Register to download File Type: cs MyExp3.cs (5.4 KB, 45 views)
Reply With Quote
The following 3 users say Thank You to devdas for this post:
 
  #6 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


devdas View Post
It provides a context to draw custom drawings through a Graphics object that "tied to" or "points to" the panel on which indicator will be applied. However its uses are certainely wide...but you can start doing simple experiments with drawing some lines and other shapes with function avalibale with graphics object. Just type
"graphics." and intellisence will show available methods for use.

similarly bounds will occupy the rectangular space of panel in which indicator will be applied...and hence mostly represent dimensions in screen pixels....just type "bounds." and get availble methods.

Lastly min and max represnt the minimum and maximum values of vertical scale of indicator panel in which indicator is applied. If none of plot containing dataseries exisit in indicator then these min and max will be nearly 0 and 1.

For your example i hv created a small script, it only draws a rectangle and then draws a string in that
showing scales minimum and maximum values. Just put indicator one by one in price panel and seperate panel and see how it behaves on scrolling chart/changing scale etc.

Looking more at your example today. Really good example.

Although the intellisense you mentioned doesn't seem to work.


Last edited by forrestang; September 7th, 2011 at 03:51 PM.
Reply With Quote
 
  #7 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,215 since Jun 2009
Thanks: 628 given, 6,311 received

as far as text colors check out indi from TMFT
View Download Details - Big Mike's Trading Forum

Reply With Quote
 
  #8 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

@devdas

In your example, you use:
 
Code
graphics.DrawString("Scale Min: " + smin + "  Scale Max: " + smax,textfont,textbrush,new Point(recleft + 10,rectop + 5));
Now it looks like this prints a string a fixed distance from the left of your rectangle, and a fixed distance from the top of your rectangle.

What if I wanted to be able to plot several variables one next to and under each other, while being able to keep everything in a nice tight box? Is this possible?

Liek in the picture I have attached here?

Attached Thumbnails
Explanation somewhere on creating custom plots with colors etc......-prime2011-09-07_173432.jpg  
Reply With Quote
 
  #9 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


forrestang View Post
@devdas

In your example, you use:
 
Code
graphics.DrawString("Scale Min: " + smin + "  Scale Max: " + smax,textfont,textbrush,new Point(recleft + 10,rectop + 5));
Now it looks like this prints a string a fixed distance from the left of your rectangle, and a fixed distance from the top of your rectangle.

What if I wanted to be able to plot several variables one next to and under each other, while being able to keep everything in a nice tight box? Is this possible?

Liek in the picture I have attached here?

Sorta thinking out loud here. But with that picture in the post I have above....... Basically I am wanting to create a text box that will remain organized if the chart is resized or if the bars are expanded or contracted.

In the script example @devdas posted, I was moving that box and text around as he suggested. And I see that he had it lined up with an offset to the left/top borders.

In that pic above, basically I have a text box, with essentially 3 rows at top with one 3 variables in each row. Followed by 4 more rows, each row with one variable. Maybe what I need to do is align everything into each one of these boxes? Since it seems like the offset is and the way you align things is based on the number of pixels. If I could count the number of pixels of a given string, then I could align everything up properly, solving the scaling problem.


Here is a pic of what I mean.


----EDIT-----------
I see scaling isn't really an issue with this method of drawing. Nice! Let me see what I can come up with.

Attached Thumbnails
Explanation somewhere on creating custom plots with colors etc......-9-7-2011-5-59-39-pm.png  

Last edited by forrestang; September 7th, 2011 at 08:17 PM.
Reply With Quote
 
  #10 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


I've made some headway with using:

 
Code
public override void Plot()
Is it possible to pass variables into this function from my main program?

Attached Thumbnails
Explanation somewhere on creating custom plots with colors etc......-prime2011-09-07_195444.jpg  
Reply With Quote

Reply



futures io > > > > > Explanation somewhere on creating custom plots with colors etc......

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
Looking for indicator that plots Volume POC forrestang NinjaTrader 20 October 15th, 2015 02:45 AM
Trouble with multiple plots on an indicator eddd NinjaTrader Programming 3 May 31st, 2011 04:45 PM
Ninjatrader indicators without plots jstnbrg NinjaTrader 6 March 2nd, 2011 02:14 AM
MACD_Zero Lag Indicator Explanation GilR NinjaTrader 4 February 25th, 2011 07:36 AM
Null Plots kenz987 NinjaTrader Programming 7 May 10th, 2010 11:29 PM


All times are GMT -4. The time now is 07:42 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-11 in 0.18 seconds with 20 queries on phoenix via your IP 54.226.132.197