Are there in code samples that illustrate how this is done?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Place a picture on a chart
Collapse
X
-
Place a picture on a chart
Hi, I would like to add a picture (i.e. a logo) to a chart.
Are there in code samples that illustrate how this is done?Tags: None
-
Hello AnotherTrader,
There are no samples we can give out at this time. You will have to use built in C# classes and methods such as the Image class. I am including a publicly available link to Microsoft's documentation for the Image class.
In order to use classes such as the Image class, you will need to know where on the screen you are drawing to. NinjaTrader 8 will provide support for this. I am including a link to the NinjaTrader 8 Help Guide documentation for GetYByValue()
Please let us know if there are any other ways we can help.Jessica P.NinjaTrader Customer Service
-
Many thanks.
A further question... is there a programmatic means to tell how many bars are shown on a chart?
Comment
-
-
Comment
-
One method that comes to mind would be to trust users to auto-scale Y values to fit the chart's data, and then to use the MAX and MIN indicators with the known period you have just discovered how to calculate. I am providing help guide documentation for the MAX and MIN indicators.
Jessica P.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_JessicaP View PostOne method that comes to mind would be to trust users to auto-scale Y values to fit the chart's data, and then to use the MAX and MIN indicators with the known period you have just discovered how to calculate. I am providing help guide documentation for the MAX and MIN indicators.
http://ninjatrader.com/support/helpG...inimum_min.htm
Or what if user autoscales not just to get min and max of price right but to get say a specific pivot line on the chart? Again, the min and max of the y axis won't correspond to the values obtained with MAX() and MIN().Last edited by AnotherTrader; 04-12-2016, 07:38 AM.
Comment
-
I was also able to find this solution on the forums, and I believe it is the best answer to your question available. You would then want to store the retrieved pass by reference values outside of the overridden method. This solution is time sensitive; you will need to ensure that GetMinMaxValues has been called before you may trust any stored values you have.
NinjaTrader 7 does not support this directly. However, this discussion from 2011 has a lot of good discussion generally on converting NinjaTrader 7 data into bounding rectangles for graphics.
In NinjaTrader 8, this will be officially supported in the documentation. I am providing a link.
Jessica P.NinjaTrader Customer Service
Comment
-
Originally posted by AnotherTrader View PostHi, I would like to add a picture (i.e. a logo) to a chart.
Are there in code samples that illustrate how this is done?
All the way at the bottom, "CustomCanvas"
NT_ChelseaB provided this code example:
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by wzgy0920, 04-20-2024, 06:09 PM
|
2 responses
27 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:43 PM
|
||
Started by wzgy0920, 02-22-2024, 01:11 AM
|
5 responses
32 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:33 PM
|
||
Started by wzgy0920, 04-23-2024, 09:53 PM
|
2 responses
49 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:29 PM
|
||
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
193 views
0 likes
|
Last Post
by Hasadafa
Yesterday, 10:19 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,235 views
0 likes
|
Last Post Yesterday, 08:07 PM |
Comment