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

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);  
                      }
                  }​

      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!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by llanqui, Yesterday, 10:29 AM
          4 responses
          23 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by TAJTrades, Today, 11:03 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by Dziu-Dziu, 02-04-2018, 07:46 AM
          26 responses
          1,767 views
          0 likes
          Last Post mochibocchi  
          Started by DawnTreader, 05-08-2024, 05:58 PM
          19 responses
          78 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by cshox, Today, 11:11 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X