//+------------------------------------------------------------------+ //| | //| Profit | //| Developed by Trader101 | //| trader101@optonline.net | //+------------------------------------------------------------------+ #property link "Julius Figueroa -- trader101@optonline.net" #property copyright "trader101" #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 Blue #property indicator_color2 Red #property indicator_color3 Yellow double guProfit,egProfit,gjProfit, ucProfit ,nuProfit ,ajProfit, ejProfit, buyProfit, sellProfit; double bProfit[], sProfit[], Profit[]; double euProfit,ujProfit,auProfit, njProfit ,gcProfit ,cjProfit, ecProfit; //+-----------------------------------------------------------------------------------+ int init() { IndicatorBuffers(3); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,bProfit); //ArrayInitialize(bProfit,EMPTY_VALUE); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,sProfit); //ArrayInitialize(sProfit,EMPTY_VALUE); SetIndexStyle(2,DRAW_LINE,0,2); SetIndexBuffer(2,Profit); //ArrayInitialize(sProfit,EMPTY_VALUE); return(0); } //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); int i; if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; for(i=limit; i>=0; i--) { //--for GBPUSD guProfit = (iClose("GBPUSDm",Period(),i)- iOpen("GBPUSDm",Period(),i))/Point; egProfit = (iClose("EURGBPm",Period(),i)- iOpen("EURGBPm",Period(),i))/Point; gjProfit = (iClose("GBPJPYm",Period(),i)- iOpen("GBPJPYm",Period(),i))/Point; ucProfit = (iClose("USDCHFm",Period(),i)- iOpen("USDCHFm",Period(),i))/Point; nuProfit = (iClose("NZDUSDm",Period(),i)- iOpen("NZDUSDm",Period(),i))/Point; ajProfit = (iClose("AUDJPYm",Period(),i)- iOpen("AUDJPYm",Period(),i))/Point; ejProfit = (iClose("EURJPYm",Period(),i)- iOpen("EURJPYm",Period(),i))/Point; buyProfit = guProfit+ egProfit+ gjProfit+ ucProfit+ nuProfit+ ajProfit+ ejProfit; bProfit[i] = buyProfit; euProfit = (iOpen("EURUSDm",Period(),i)- iClose("EURUSDm",Period(),i))/Point; ujProfit = (iOpen("USDJPYm",Period(),i)- iClose("USDJPYm",Period(),i))/Point; auProfit = (iOpen("AUDUSDm",Period(),i)- iClose("AUDUSDm",Period(),i))/Point; njProfit = (iOpen("NZDJPYm",Period(),i)- iClose("NZDJPYm",Period(),i))/Point; gcProfit = (iOpen("GBPCHFm",Period(),i)- iClose("GBPCHFm",Period(),i))/Point; cjProfit = (iOpen("CHFJPYm",Period(),i)- iClose("CHFJPYm",Period(),i))/Point; ecProfit = (iOpen("EURCHFm",Period(),i)- iClose("EURCHFm",Period(),i))/Point; sellProfit = euProfit+ ujProfit+ auProfit+ njProfit+ gcProfit+ cjProfit+ ecProfit; sProfit[i] = sellProfit; //Profit[i] = bProfit + sProfit; Profit[i] = buyProfit + sellProfit; } //Comment(Profit[0]); return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Series array that contains open prices of each bar
Series array that contains close prices for each bar
Indicator Curves created:
Implements a curve of type DRAW_LINE
Indicators Used:
Custom Indicators Used:
Order Management characteristics:
Other Features: