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 pechtri, 06-22-2023, 02:31 AM
    10 responses
    124 views
    0 likes
    Last Post Leeroy_Jenkins  
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Yesterday, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Yesterday, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Yesterday, 03:01 PM
    2 responses
    22 views
    0 likes
    Last Post helpwanted  
    Working...
    X