Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Updating plot window name

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

    Updating plot window name

    My StrategyPlot(0).Value updates ok as expected, but the "StrategyPlot(0).Name" only updates when I reload the strategy, moved the StrategyPlot(0).Name to different sections of the code but no help..
    Maybe the "StrategyPlot(0).Name" only loads when the strategy is started by design, if so any workaround?


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

    StrategyPlot(0).Name ="PNL TodayB " + (profit + Position.GetProfitLoss(Close[0], PerformanceUnit.Currency)).ToString(" $#.#")+
    " Account History: "+ "Days ="+SessionCtr.ToString()+ " PNL: " + realized.ToString("$#.##") +" DD: " + drawdown.ToString("$#.##")+ "\n";
    Attached Files

    #2
    Hello gg80108,

    You may run into issues trying to set the name based on performance calculations, as these are simply not available at the start of the strategy run.

    If you want this type of info as the strategy is running, using DrawTextFixed() is one alternative.

    You can set the name of the plot when you add it. There is nothing reserved about the name StrategyPlot() so feel free to name yours PNLToday when adding and setting.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    646 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    367 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X