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 CaptainJack, 05-29-2026, 05:09 AM
          0 responses
          475 views
          0 likes
          Last Post CaptainJack  
          Started by CaptainJack, 05-29-2026, 12:02 AM
          0 responses
          315 views
          0 likes
          Last Post CaptainJack  
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          253 views
          1 like
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          340 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          305 views
          0 likes
          Last Post CarlTrading  
          Working...
          X