Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 algospoke, 04-17-2024, 06:40 PM
      6 responses
      49 views
      0 likes
      Last Post algospoke  
      Started by arvidvanstaey, Today, 02:19 PM
      4 responses
      11 views
      0 likes
      Last Post arvidvanstaey  
      Started by samish18, 04-17-2024, 08:57 AM
      16 responses
      61 views
      0 likes
      Last Post samish18  
      Started by jordanq2, Today, 03:10 PM
      2 responses
      11 views
      0 likes
      Last Post jordanq2  
      Started by traderqz, Today, 12:06 AM
      10 responses
      21 views
      0 likes
      Last Post traderqz  
      Working...
      X