Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get DrawingTool Color

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

    #16
    Hello TradeSaber,

    I think we were overlooking this is an assembly, which may need the dynamic approach as the object types will be different.

    May I have you try:
    Print((draw as dynamic).TextColor);
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Hi Chelsea,

      Thank you for the reply!

      Forgive me if I'm being dumb. But anywhere I add this code it does not let me enable strategy.
      Does not contain a definition of TextColor


      Does this seem right?:

      Code:
      ​            foreach (DrawingTool draw in DrawObjects.ToList())
                  {                
                      if (draw is DrawingTools.DrawingTool)
                      {
      
                            DrawingTools.DrawingTool temp = draw as DrawingTools.DrawingTool;
                          
                            //DrawingTools.Text textObject = draw as DrawingTools.Text;
                          
          
                          Print(draw.GetType().Name);
                          
                          Print((draw as dynamic).TextColor);  
                      }
                  }​
      TradeSaber Inc.NinjaTrader Ecosystem Vendor - TradeSaber Inc.

      Comment


        #18
        Hello TradeSaber,

        Sorry that should have been TextBrush.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #19
          Hi Chelsea,

          I think that was the missing piece! Seems to be working now.

          Thank you so much!
          TradeSaber Inc.NinjaTrader Ecosystem Vendor - TradeSaber Inc.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, 03-13-2026, 05:17 AM
          0 responses
          86 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          151 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          79 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          53 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          61 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X