Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

calling ninjatraderecosystem indicator from strategy

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

    calling ninjatraderecosystem indicator from strategy

    Hello,

    I am trying to call the public available indicator
    This indicator provides a customizable text box which displays a position’s UnRealized PnL, Realized PnL of a selected account, and the overall cash value of the account.

    from a strategy (attached minimal code).

    The compilation fails, the reason being that I do not provide the correct number of parameters to the indicator.
    The tool-tip indicates that 8 parameters are needed, which I provided -- -- please see attached screenshot.

    How should I call this indicator from a strategy? Thank you.​
    Attached Files

    #2
    Hello utilizator,

    Thank you for your post.

    I was able to get the strategy to compile successfully and also plot on the chart with the following:

    Code:
    else if (State == State.DataLoaded)
    {
    PnLIndicator = new PositionDisplayIndicator();  // uses default values
    PnLIndicator.PositiveBrush = Brushes.Black;  //  could modify the values of each property as desired, like this change to the PositiveBrush color
    
    // using the overload in AddChartIndicator does work and compile successfully with the designated property values
    AddChartIndicator(PositionDisplayIndicator(Closes[0],
    //Default,
    10,// verticalOffset
    10, //horizontalOffset,
    Brushes.Black, // label text brush
    Brushes.White,// area brush
    Brushes.Black, // border brush
    Brushes.Black, // + PnL brush
    Brushes.Black)); // - PnL brush ;
    }
    Please let us know if we may be of further assistance.​

    Comment


      #3
      Thank you !

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      476 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      317 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      254 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      340 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      305 views
      0 likes
      Last Post CarlTrading  
      Working...
      X