Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

StrategyPlot Pen Color

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

    StrategyPlot Pen Color

    Trying to change the Strategy.Plot color based on Value,,, but just doesn't change color, alway blue..
    Did notice in the indicators window there is an entry for color, which probably always overrides what my code says.. any suggestion would be appreciated..

    protected override void OnBarUpdate()

    StrategyPlot(0).Value.Set(profit + Position.GetProfitLoss(Close[0], PerformanceUnit.Currency));

    if (StrategyPlot(0).Value[0] >= 0)
    StrategyPlot(0).Plots[0].Pen.Color = Color.Blue;
    else
    StrategyPlot(0).Plots[0].Pen.Color = Color.Red;

    #2
    Hello,

    Are you using NinjaTrader 6.5 or NinjaTrader 7. As depending on what version a different approach to do this is requred.

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      Ninja Trader 7

      Comment


        #4
        Hello,

        Ok thanks, for this you need to use a multi indicator / plot color approach. Please see this sample o how to do this in NT7.



        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X