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!
See more
See less

Partner 728x90

Collapse

Sample Code for Drawing in AddOn

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_Jim
    replied
    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.

    Leave a comment:


  • MarkWise
    replied
    That would be extremely helpful,, thanks!

    I'll do some of my own research as well.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    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:


  • MarkWise
    started a topic Sample Code for Drawing in AddOn

    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!

Latest Posts

Collapse

Topics Statistics Last Post
Started by Shansen, 08-30-2019, 10:18 PM
24 responses
938 views
0 likes
Last Post spwizard  
Started by Max238, Today, 01:28 AM
0 responses
3 views
0 likes
Last Post Max238
by Max238
 
Started by rocketman7, Today, 01:00 AM
0 responses
2 views
0 likes
Last Post rocketman7  
Started by wzgy0920, 04-20-2024, 06:09 PM
2 responses
27 views
0 likes
Last Post wzgy0920  
Started by wzgy0920, 02-22-2024, 01:11 AM
5 responses
32 views
0 likes
Last Post wzgy0920  
Working...
X