Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing the Color of the PnL in the Basic Order Window

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

    Changing the Color of the PnL in the Basic Order Window

    Hi.

    The PnL is shown between the BE-button and the Close-button in the Basic Order Entry Window. I find it very hard to read the PnL when I am in the red due to the combinatiuon of backgroundcolor and foregroundcolor.

    Almost every other part of the window can be customized, but I can not se how to change the colors for the PnL. Is there any way to do this? I am willing to write a script if necessary, but I need to be pointed in the right direction.

    Can anyone help please?

    #2
    Hello Bardmannseth,

    Thank you for your inquiry.

    This color cannot be changed within the UI of NinjaTrader. It is programmed within the skin that you have applied to the platform. In order to alter the color of the PnL display when showing a loss, you will need to edit the code of the skin. Skins are located on your PC at C:\Users\<YourUserName>\Documents\NinjaTrader 8\templates\Skins. From there, you will select the folder of the skin that you have applied (Light, Dark, Slate Grey, Slate Light, Slate Dark). After navigating to the folder of the skin you have applied, you will want to open the BluePrint.xaml file in a text editor. You want to locate the following section in the BluePrint.xaml file (you can do these by selecting CTRL+F and searching for either PnL or Profit):

    Code:
    <!-- Background colors for Flat, Long, or Short positions for the Position Display in order-entry windows --> <SolidColorBrush po:Freeze="true" x:Key="FlatBackground" Color="Black"/> <SolidColorBrush po:Freeze="true" x:Key="LongBackground" Color="#FF00D409"/> <SolidColorBrush po:Freeze="true" x:Key="ShortBackground" Color="#FFb70000"/> <SolidColorBrush po:Freeze="true" x:Key="PositionTextBlockBrush" Color="White" /> <SolidColorBrush po:Freeze="true" x:Key="PositionTextBlockProfitBrush" Color="LimeGreen" /> <SolidColorBrush po:Freeze="true" x:Key="PositionTextBlockLossBrush" Color="Red" />
    The 'PositionTextBlockLossBrush' Color property will determine the color of the text displayed when your position is in the red. If you change this color at all, make sure to save the change to the .xaml document and restart NinjaTrader for the change to apply.

    Comment


      #3
      Is is possible to change the black background color of the PnL, instead of the text? Using your instructions, I was able to change the background color of the number of contracts, but not the background color of the PnL. Only the "Dark" skin shows PnL with a white background natively, so I'm thinking somehow it's possible to do the same with the Slate Gray skin.

      Many thanks for your help.
      Last edited by TD_RidgeRunner; 10-10-2024, 07:36 PM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      71 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      43 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      25 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      28 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      56 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X