Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

creating Indicator DataSeries with the values ​​of MFE

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

    creating Indicator DataSeries with the values ​​of MFE

    i want to create an indicator with DataSeries that contains the values of MFE. in this way tells me error. How can I do?

    #region Variables
    private DataSeries MFEDataSeries;
    #endregion

    protected override void Initialize ()
    {

    MFEDataSeries = new DataSeries (this);

    CalculateOnBarClose = true;
    Overlay = false;
    }

    protected override void OnBarUpdate ()
    {


    double mfe = Performance.AllTrades.TradesPerformance.Currency.A vgMfe / / ERROR

    MFEDataSeries.Set(Math.Abs(mfe));


    AvgR.Set (SMA (MFEDataSeries, Period) [0]);
    }

    Ciao.
    Roberto

    #2
    Hello Italy,

    That is because Performance is an object of a Strategy Class not the Indicator Class. You may view the following link that goes over the Performance object from our Help Guide.

    http://www.ninjatrader.com/support/h...erformance.htm

    If you would like to plot the trade performance of a Strategy then you can plot inside a Strategy. Note that the Strategy will only have access to the Trade performance of itself at run time, meaning that the trade performance that you access will only have the current trade performance of the strategy in that instance. The following thread has a reference sample that goes over how to plot withing a Strategy that you may view.
    http://www.ninjatrader.com/support/f...ead.php?t=6651

    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Hello Josh,
      I already use my strategies MFE values​​. I do not see them on the chart, I do not care!
      I would like, if possible, to construct an indicator with values ​​of MFE. Is there a command to get the value of MFE (maximum favorable excursion) ?
      Ciao.
      Roberto

      Comment


        #4
        Hello Italy,

        There is no command to get the AvgMfe (average maximum favorable excursion) from within an Indicator.
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        181 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        334 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        258 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        358 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        187 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X