• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 caveat_lector, 05-25-2020, 04:34 PM
2 responses
20 views
0 likes
Last Post NinjaTrader_Kate  
Started by Grantx, Today, 08:22 AM
0 responses
5 views
0 likes
Last Post Grantx
by Grantx
 
Started by Swing123, Today, 08:21 AM
2 responses
5 views
0 likes
Last Post Swing123  
Started by lunardiplomacy, Today, 07:57 AM
0 responses
5 views
0 likes
Last Post lunardiplomacy  
Started by Tagliareni, Yesterday, 08:10 PM
1 response
12 views
0 likes
Last Post NinjaTrader_PaulH  
Working...
X