Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Addplot with a variable from OnRender

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

    Using Addplot with a variable from OnRender

    Hello,


    I tried to create a line in the chart with AddPlot Value[0] = variable;

    My class variable is from OnRender but only the last value of the values from the variable result will show in the chart. You will reply move your code into OnBarUpdate but is there a way i can keep the variable in OR class and send it to OBU?

    Its working if i draw horiz or vert line i just send the variable from OR to OBU and it does the job.

    Thank you

    #2
    Hello frankduc,

    Thanks for your post.

    Plots have a Series<double> associated with them which is relative to the bars on the chart. Series values should be assigned in OnBarUpdate.

    OnRender should be used for custom rendering what is visible on the chart alone. If you want to draw a line in OnRender, use SharpDX instead of assigning plot values.

    To get more acquainted with SharpDX rendering, please see the Help Guide article below, and please see the SampleCustomRender indicator that comes with NinjaTrader.

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

    We look forward to assisting.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    56 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    75 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    39 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    101 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    60 views
    0 likes
    Last Post PaulMohn  
    Working...
    X