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