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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    64 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X