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

timezonecolor from NinjaTrader_Jesse

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

    timezonecolor from NinjaTrader_Jesse

    I get the last few days a strange message, although I use this indicator already a long time. I watched in the code but have no clue what the problem is.

    Click image for larger version

Name:	2020-02-26 22_53_26-Control Center - Log.jpg
Views:	211
Size:	63.6 KB
ID:	1088611

    #2
    Hello marcus2300,

    This conversion dynamically creates brushes within the script's OnBarUpdate method. On a chart where a lot of data is loaded, the script can have the potential to create over 65535 brushes, which would exceed the limit for Windows Media Brushes.

    The script could be modified so that the RGB values it creates for the brushes are normalized to smaller range than 255. For example, if the each RGB value is limited to 0-40 instead of 0-255, the number of brushes that the scripts can make would be less than this limit (1 * 40 * 40 * 40 < 65535) or ( A * R * G * B < Number of possible brushes)

    We wanted to keep the script consistent with the original NinjaTrader 7 version and decided to leave the script's logic as is since this error would only be encountered when the script is used for a long time or on a chart with a lot of data.

    If there is enough impact here, we can make changes, but this would reduce the "color resolution" and limit the appearance of the indicator.

    Let us know if you have any questions.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Barry Milan, Yesterday, 10:35 PM
    5 responses
    16 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by DanielSanMartin, Yesterday, 02:37 PM
    2 responses
    13 views
    0 likes
    Last Post DanielSanMartin  
    Started by DJ888, 04-16-2024, 06:09 PM
    4 responses
    13 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by terofs, Today, 04:18 PM
    0 responses
    11 views
    0 likes
    Last Post terofs
    by terofs
     
    Started by nandhumca, Today, 03:41 PM
    0 responses
    8 views
    0 likes
    Last Post nandhumca  
    Working...
    X