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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      134 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X