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 omermirza, Today, 12:39 PM
        0 responses
        2 views
        0 likes
        Last Post omermirza  
        Started by larkmail, Today, 12:30 PM
        0 responses
        4 views
        0 likes
        Last Post larkmail  
        Started by Danila, Today, 11:08 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by dbida001, Today, 10:31 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by Brandon9821, Today, 08:27 AM
        3 responses
        29 views
        0 likes
        Last Post Brandon9821  
        Working...
        X