Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error drawing text in @Text.cs

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

    Error drawing text in @Text.cs

    Hello,
    have you seen this error generated during an execution of a strategy ? Any idea? I wander what could cause it.
    The account is playback and the error happens while playing it. I don't have the problem in historical, all text get drawing correctly.

    My code is
    if (My OrderSubmitted)
    {
    int ccc = CurrentBar;
    int ccc2 = -ccc;
    double yPos1 = Hight[0];
    if (drawLabels) Draw.Text(strat, ccc.ToString(), this.DebugStr, 0, yPos1);
    }

    The code is really plain simple. It submits orders and then draws a Text under the entry line
    Interesting is that I get the error only with texts, not the arrows. The Text is always "LSM";

    The attached image shows all variables in the class Draw of @Text.cs original NinjaTrader code.
    Best
    Gio


    Click image for larger version  Name:	NinjaErrorDrawingText.jpg Views:	0 Size:	511.7 KB ID:	1325380
    Last edited by giogio1; 11-22-2024, 05:37 AM.

    #2
    Hello Gio,

    The system indicator may have been replaced during an import and might not be the default file.

    First, please try deleting the file and then re-downloading the installer and running the repair.
    1. Shutdown NinjaTrader
    2. The file will be located Documents\NinjaTrader 8\bin\Custom\DrawingTools\@Text.cs.
    3. Once deleted, re-download the installer to ensure this is the latest release.
      1. https://account.ninjatrader.com/welcome-download
    4. Run the repair and test for the issue.

    If the issue can still be reproduced, create a new reduced test strategy that calls the Draw.Text() method and can reproduce the error.
    Export this and attach this as an attachment to your next post.

    To export a NinjaTrader 8 NinjaScript so this can be shared and imported by the recipient do the following:
    1. Click Tools -> Export -> NinjaScript Add-on...
    2. Click the 'add' link -> check the box(es) for the script(s) and reference(s) you want to include
    3. Click the 'Export' button
    4. Enter the script name in the value for 'File name:'
    5. Choose a save location -> click Save
    6. Click OK to clear the export location message
    By default your exported file will be in the following location:
    • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>
    Below is a link to the help guide on Exporting NinjaScripts.
    http://ninjatrader.com/support/helpG...nt8/export.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X