Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Line in Strategy

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

    Draw.Line in Strategy

    Hi. I'm trying to use Draw.Line in Strategy.


    Code:
    protected override void OnMarketData(MarketDataEventArgs e)
    {
      if(State==State.Historical|| CurrentBar <= 2)return;
    
      TriggerCustomEvent(o =>Draw.Line(this,"line", false, 5,Close[0], 1, Close[0], Brushes.LimeGreen, DashStyleHelper.Dot, 4),null);
    }
    It works well, but sometimes i have the error
    ERROR: Failed to call OnRender() for chart object 'Line': 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

    Is this a bug? Or maybe I can't draw lines in Strategy?

    #2
    Hello blekdzhon,

    Thank you for your post.

    You can draw lines in strategies. I will investigate the behavior using your code further but please send me your log and trace files so that I may look into what occurred. You can do this by going to the Control Center-> Help-> Email Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.

    Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.

    I look forward to your response.

    Comment


      #3
      Hello blekdzhon,

      Thank you for your patience.

      I worked with the user and I have the files I need from his PC. Please contact me at platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H - 1835861' in the subject line so we may discuss this item further with you.

      I look forward to assisting you further.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X