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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    647 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X