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 Blairski, Yesterday, 09:19 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by tonynt, Today, 09:33 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by minotti1, Today, 08:31 AM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by SmartArtsStudio, 05-15-2021, 10:46 AM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Airwave, Today, 06:02 AM
        2 responses
        21 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X