The Megan ratio as discussed in "The Megan Ratio" by Oscar Cagigas is available for download here.
Once downloaded, from within the NinjaTrader Control Center window, select the menu File > Utilities > Import NinjaScript and select the downloaded file. This indicator is for NinjaTrader Version 6.5 or greater.
You can review the indicator source code by selecting the menu Tools > Edit NinjaScript > Strategy from within the NinjaTrader Control Center window and selecting either MeganRatioStrategy1 or MeganRatioStrategy2.