Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Mfe / mae

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

    Mfe / mae

    Hey guys,

    Im trying to further adjust my strategy to alter its buy and sell position using ETD & MAE. So if I understand correctly, ETD is the amount the price rose to and the difference from your exit. And MAE, the entry vs how much the price went in the opposite direction.

    ie Your long and you entry @ 90, it drops to 85c then it rises to 99, then you sell at 97, your ETD is the 2c difference. And the MAE is the 5c difference.

    So I used the following code to gather this information.

    //MFE
    PrintWithTimeStamp("" + Instrument.FullName + " MFE - " + Performance.AllTrades.TradesPerformance.Currency.A vgMfe.ToString() + "\r\nPoints: " + Performance.AllTrades.TradesPerformance.Points.Avg Mfe.ToString());

    //MAE
    PrintWithTimeStamp(
    "" + Instrument.FullName + " MAE - " +
    Performance.AllTrades.TradesPerformance.Currency.A vgMae.ToString() + "\r\nPoints: " + Performance.AllTrades.TradesPerformance.Points.Avg Mae.ToString());

    //ETD
    PrintWithTimeStamp(
    "" + Instrument.FullName + " ETD - " + Performance.AllTrades.TradesPerformance.Currency.A vgEtd.ToString() + "\r\nPoints: " + Performance.AllTrades.TradesPerformance.Points.Avg Etd.ToString());

    The strategy returned the following results.

    $AUDJPY MFE - 249.999999999986
    Points: 249.999999999986


    $AUDJPY MAE - 75.0000000000028
    Points: 75.0000000000028


    $AUDJPY ETD - 0
    Points: 0


    Does anyone have in-site into how I can adjust these values, to work with an entry and exit strategy, I tried points and also currency. I'm just unsure why it has returned the values. Any help in better understanding this information would be much appreciated. I was hoping for like 2 ticks etc, so I can make alterations to my entry and exit targets.
    Attached Files

    #2
    Sorry, double post, the code has some weird space in it that is not there when I typed it, or attempted to edit it. So if you copy paste just fix the spaces.

    Comment


      #3
      Hello happypappy,

      Thank you for your post.

      I will need to test this on my end, but for the Points values you can use Instrument.MasterInstrument.Round2TickSize(double price): http://www.ninjatrader.com/support/h...trument_ro.htm

      Comment


        #4
        Perfect thank you this will help me.

        Comment


          #5
          I worked out yesterday that the points are returned against the amount of units entered, so in the screenshot I had 5000 units which was ~250 points. So 250 / 5000 = 00.05 ticks. This allows me to adjust me entry and exit.

          Thanks for your help.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by jclose, Today, 09:37 PM
          0 responses
          4 views
          0 likes
          Last Post jclose
          by jclose
           
          Started by WeyldFalcon, 08-07-2020, 06:13 AM
          10 responses
          1,413 views
          0 likes
          Last Post Traderontheroad  
          Started by firefoxforum12, Today, 08:53 PM
          0 responses
          9 views
          0 likes
          Last Post firefoxforum12  
          Started by stafe, Today, 08:34 PM
          0 responses
          10 views
          0 likes
          Last Post stafe
          by stafe
           
          Started by sastrades, 01-31-2024, 10:19 PM
          11 responses
          169 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X