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

Question on using MFE function to collect stats without trading?

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

    Question on using MFE function to collect stats without trading?

    Hello,

    I am wondering if you can collect stats on various things by using an MFE function or something similar?

    So for example you wanted to collect a stat after a 2 Bars with Higher Highs are formed, took that second High as a start point, and tracked how far DOWN price moved over some sample size.

    Or if you wanted to know how far UP price moved after a moving average crossover?

    I've done basic stats capturing in this way before, outputed them, and ported into excel for analysis. But I am wanting to use an MFE function or similar because "UP" or "Down" is a subjective term, so I can't think of a way to tell the script a measure of "Down" or "Up." I am wondering if the MFE or similar function might take care of that for me?

    #2
    Hi forrestang,

    The MFE calculation is used in performance reporting for trades made backtesting/realtime. We do not support accessing it for your custom calculations, but you're free to explore intellisense and see if it offers what you're looking for.

    It may work better to take the definition and custom code something for the situation you're looking to calculate.

    MFE (max. favorable excursion) is defined as (best price trade reached – entry price), quantity is defined as the number of contracts traded, and point value is defined as the monetary conversion of each point (e.g. 100 for currency pairs).

    Best / Worst depends on the direction of the trade (long or short), and would use Highs or Lows to catch the extremes. You will basically need a starting point to identify where you want to lookback, and can use built in functions MAX(), MIN() to get highest /lowest values over a series of bars.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,604 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    8 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    4 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    13 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X