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 NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      56 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      133 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      73 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X