Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dynamically adding Plots/Values

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

  • NickyD
    replied
    That code sample looks like I can adapt it for this purpose, thanks. I guess I will have dive into SharpDX finally, I've been avoiding it for a few years.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello NickyD,

    Thanks for your question.

    Plots can be added as late as State.Configure, so depending on what you are accessing, you could dynamically add plots there. We should note that some properties based on loaded data or user input may not be available in State.Configure (I.E. Bars, Instrument, User Defined Inputs) so that may be a road block for what you are trying to add dynamically.

    AddPlot() - https://ninjatrader.com/support/help...8/?addplot.htm

    If what you are doping requires User Defined Inputs and/or data loaded, State.DataLoaded would need to be used and you will need to use custom rendering to draw your plots. Plots can be drawn with Geometry. I have attached an example that can demonstrate. You should be familiar with SharpDX rendering, so I recommend following our SampleCustomRender example indicator that comes with NinjaTrader and the documentation below to get acquainted.

    https://ninjatrader.com/support/help..._rendering.htm

    We look forward to assisting.
    Attached Files

    Leave a comment:


  • NickyD
    started a topic Dynamically adding Plots/Values

    Dynamically adding Plots/Values

    I am fetching values from a URL to overlay on my chart. There will always be 2 but up to (N) number of values to display.

    In other words, I will be fetching a dictionary that has an unknown number of keys in it, I want to display all of them, but it might have 5 today and then 4 tomorrow when the new data is fetched. Is there a way I can dynamically add/remove Values/Plots? Any examples you can point me to?

    At the moment I think this is not possible and I'll have to draw my own custom lines... which I am not super familiar with. Any alternative approaches appreciated.

Latest Posts

Collapse

Topics Statistics Last Post
Started by asgandabdoil, Yesterday, 10:48 PM
0 responses
3 views
0 likes
Last Post asgandabdoil  
Started by asgandabdoil, Yesterday, 10:47 PM
0 responses
5 views
0 likes
Last Post asgandabdoil  
Started by soon123, Yesterday, 07:37 PM
2 responses
11 views
0 likes
Last Post s.kinra
by s.kinra
 
Started by MKV17, Yesterday, 07:16 PM
0 responses
7 views
0 likes
Last Post MKV17
by MKV17
 
Started by BrennanSalibrici, Yesterday, 07:03 PM
0 responses
4 views
0 likes
Last Post BrennanSalibrici  
Working...
X