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
Sample Code for Drawing in AddOn
Collapse
X
-
Hello MarkWise,
After looking into this further, the rabbit hole appears to get deeper and deeper and the possibility of doing this gets further and further away from what we may support.
Even if the RenderTarget is captured and then used externally from an AddOn, the rendering from the AddOn would not be in sync with the chart. I.E. a chart's render pass could update immediately after the AddOn draws to it and the custom rendering would be lost.
As the syncing issue would be a difficult issue to overcome, I would advise to stick to leaving custom rendering in the context of an indicator.
If there is any thing else I can do to be of further help, please let me know.
-
That would be extremely helpful,, thanks!
I'll do some of my own research as well.
Leave a comment:
-
Hello MarkWise,
Thank you for opening the thread.
We currently don't have any example code that can demonstrate this.
The AddOnBase class does not have a RenderTarget or methods for rendering. You could include the SharpDX using directives and capture the RenderTarget, ChartControl, and ChartScale of a Chart so you can create your own external OnRender() and OnRenderTargetChanged() methods for custom rendering to that chart.
I will look into creating a basic example to see if this would be possible through supported methods.
I look forward to being of further assistance.
Leave a comment:
-
Sample Code for Drawing in AddOn
Hello!
I'm trying to do some custom drawing on a chart from within my AddOnBase subclass.
Are they any examples on how to do this? I'm used to using OnRender(), RenderTarget, etc (with the SharpDX API) but I don't really see a facility for that in the "AddOnBase" world.
If you could point me in the right direction, that would be wonderful.
Thanks in advance!Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Shansen, 08-30-2019, 10:18 PM
|
24 responses
938 views
0 likes
|
Last Post
by spwizard
Today, 01:29 AM
|
||
Started by Max238, Today, 01:28 AM
|
0 responses
3 views
0 likes
|
Last Post
by Max238
Today, 01:28 AM
|
||
Started by rocketman7, Today, 01:00 AM
|
0 responses
2 views
0 likes
|
Last Post
by rocketman7
Today, 01:00 AM
|
||
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
|
Leave a comment: