//+------------------------------------------------------------------+ //| FPI – Fractional Product Inefficiency | //| FPI.mq4 | //| Developed by Coders Guru | //| http://www.xpworx.com | //+------------------------------------------------------------------+ #property link "http://www.xpworx.com" #property copyright "Coders' Guru" #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Yellow double Main[] , EurUsd[] ,UsdJpy[] ,EurJpy[] ; //+------------------------------------------------------------------+ int init() { IndicatorBuffers(4); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,Main); SetIndexBuffer(1,EurUsd); SetIndexBuffer(2,UsdJpy); SetIndexBuffer(3,EurJpy); ArrayInitialize(EurUsd,EMPTY_VALUE); ArrayInitialize(UsdJpy,EMPTY_VALUE); ArrayInitialize(EurJpy,EMPTY_VALUE); ArrayInitialize(Main,EMPTY_VALUE); return(0); } //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ int start() { ArrayCopySeries(EurUsd,MODE_CLOSE,"EURUSD",Period()); ArrayCopySeries(UsdJpy,MODE_CLOSE,"USDJPY",Period()); ArrayCopySeries(EurJpy,MODE_CLOSE,"EURJPY",Period()); int counted_bars=IndicatorCounted(); int i = 0; if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; for(i=0; i