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 burtoninlondon, Today, 12:38 AM
          0 responses
          10 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          14 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          11 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Yesterday, 07:51 PM
          0 responses
          14 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,983 views
          3 likes
          Last Post jhudas88  
          Working...
          X