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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    35 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    12 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    18 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X