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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          87 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          132 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
          118 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