Navigation´╝ÜHome > Content >

KungFuPips.mq4

Time: 2013-07-15 | Download file:KungFuPips.mq4

/*
   Generated by EX4-TO-MQ4 decompiler V4.0.469.1 [-]
   Website: https://purebeam.biz
   E-mail : purebeam@gmail.com
*/
#property copyright "Niyi B, 2013"
#property link      ""

#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Lime
#property indicator_color2 Red
#property indicator_color3 Lime
#property indicator_color4 Red
/*
#import "KungFuPips.dll"
   bool Activate(string a0, string a1, string a2, int a3, string a4, int a5, string a6, string a7);
   void GetLastErrorDescription(string a0);
   double func101(double a0);
   double func102(double a0);
   double func103(int a0); */
#import "KFPips.dll"
   double signalyzer(int a0, double a1, double a2, double a3, double a4, double a5, double a6, double a7);
#import

string gs_76 = "1.0";
string License = "";
bool gi_92 = FALSE;
bool gi_96 = FALSE;
string gs_100;
int gi_108;
extern string __BolingerBandsParameters__ = "";
extern int BBPeriod = 20;
extern int BBDev = 2;
extern int gi_120 = 0;
int gi_124 = 0;
extern string _________________________ = "";
extern int ArrowOffset = 2;
extern bool alert = false;
int gi_132 = 0;
double gda_136[];
double gda_140[];
double gda_144[];
double gda_148[];
double gd_152;


string f0_1() {
   return (StringConcatenate("v=", gs_76, "&", "b=", AccountCompany()));
}
			 	 		     		  	 	 		    	   			 		 		     	 	 			  	   				  	  		      		  	  		     	 	 			   	 				 	 	 								   		 		 	 		 			  	 	 	 		
int init() {
   int ai_0;
   int ai_4;
   double ld_24;
   double ld_16;
   double ld_32;
   double ld_40;
   double ld_48;
   double ld_56;
   SetIndexBuffer(0, gda_136);
   SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID, 4);
   SetIndexArrow(0, 233);
   SetIndexLabel(0, "Kung Fu Pips Buy");
   SetIndexBuffer(1, gda_140);
   SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 4 );
   SetIndexArrow(1, 234);
   SetIndexLabel(1, "Kung Fu Pips Sell");
   SetIndexBuffer(2, gda_144);
   SetIndexStyle(2, DRAW_ARROW, STYLE_SOLID, 4);
   SetIndexArrow(2, SYMBOL_STOPSIGN);
   SetIndexLabel(2, "Kung Fu Pips Buy Take Profit");
   SetIndexBuffer(3, gda_148);
   SetIndexStyle(3, DRAW_ARROW, STYLE_SOLID, 4);
   SetIndexArrow(3, SYMBOL_STOPSIGN);
   SetIndexLabel(3, "Kung Fu Pips Sell Take Profit");
   if (Digits == 3 || Digits == 5) gd_152 = 10.0 * Point;
   else gd_152 = Point;
   Comment("ForexWinners.Net");
   IndicatorShortName("Kung Fu Pips");
/*   if (IsDemo()) gi_108 = 1;
   else gi_108 = 2;
   if (AccountNumber() == 0) {
      gi_92 = TRUE;
      return (0);
   }
   gi_96 = Activate(TerminalPath(), "" + AccountNumber(), AccountName(), gi_108, License, 1, "KungFuPips.ex4", f0_1());
   if (gi_96) {
      Print("KungFuPips License Activated");
      Comment("KungFuPips License Activated");
   }
   gs_100 = "123345345345353454364564564564646f34565465464564564564645645646464645645645646464564612313131313131313133343333333333333333333333333333333eeeeeeeeeeeeeeddddddddddddddddddddddddddddddddddddddqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwwewewewewewewewwwwwwwe1";
   GetLastErrorDescription(gs_100);*/

   double ld_64 = signalyzer(ai_0, ld_24, ld_16, ld_32, ld_40, ld_48, Close[ai_4], ld_56);
   return (0);
}
				 	  	  		  			  	  		   			  	   	  	  		 	 			 		 		 	   		     				    		 	 	 						  	   	   	     		 	   		   						  	 				   			  	 	  
int deinit() {
   return (0);
}
			  	 		   	   		 		   	  					 	 	 	 		   	 								  	 		  	    	 		 	  	 				 					 		 		  		  		  	  	  	 	 			  	 			   					     		 		 		 
int start() {
   int li_0;
   int li_4 = IndicatorCounted();
/*   if (gi_92) {
      if (AccountNumber() == 0) {
         Comment("Connecting to license server...");
         return (0);
      }
      gi_92 = FALSE;
      if (IsDemo()) gi_108 = 1;
      else gi_108 = 2;
      gi_96 = Activate(TerminalPath(), "" + AccountNumber(), AccountName(), gi_108, License, 1, "KungFuPips.ex4", f0_1());
      if (gi_96) {
         Print("KungFuPips License Activated");
         Comment("KungFuPips License Activated");
      }
      gs_100 = "123345345345353454364564564564646f34565465464564564564645645646464645645645646464564612313131313131313133343333333333333333333333333333333eeeeeeeeeeeeeeddddddddddddddddddddddddddddddddddddddqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwwewewewewewewewwwwwwwe1";
      GetLastErrorDescription(gs_100);
   }
   if (gi_96 == TRUE) {
      Comment(gs_100);
      return (0);
   }
   gi_112 = func101(Open[li_0]);
   gi_116 = func102(Close[li_0]);
   gi_120 = func103(gi_132); */
   for (li_0 = Bars - li_4 - 1; li_0 > 0; li_0--) {
      if (f0_2(li_0 + gi_132 + 3) && f0_2(li_0 + gi_132 + 2) && f0_3(li_0 + gi_132 + 1) && f0_3(li_0 + gi_132) && f0_0(1, li_0 + gi_132) != 0.0) {
         gda_136[li_0] = Open[li_0] - ArrowOffset * gd_152;
         gda_144[li_0] = f0_0(1, li_0 + gi_132);
         if (alert == true) {
         Alert("Kung Fu Buy " + Symbol() + " on close of candle. Set TP " + DoubleToStr(gda_144[li_0], Digits));
         SendMail("Kung Fu Pips Alert", "Kung Fu Buy " + Symbol() + " on close of candle. Set TP " + DoubleToStr(gda_144[li_0], Digits));
         }
      }
      if (f0_3(li_0 + gi_132 + 3) && f0_3(li_0 + gi_132 + 2) && f0_2(li_0 + gi_132 + 1) && f0_2(li_0 + gi_132) && f0_0(2, li_0 + gi_132) != 0.0) {
         gda_140[li_0] = Open[li_0] + ArrowOffset * gd_152;
         gda_148[li_0] = f0_0(2, li_0 + gi_132);
         if (alert == true) {
         Alert("Kung Fu Sell " + Symbol() + " on close of candle. Set TP " + DoubleToStr(gda_148[li_0], Digits));
         SendMail("Kung Fu Pips Alert", "Kung Fu Sell " + Symbol() + " on close of candle. Set TP " + DoubleToStr(gda_148[li_0], Digits));
         }
      }
   }
   return (0);
}
		 	 	    			  	 		 	  	  	 			 			  	    			 	  	  		 	      			 	  			  	  		     				 		 	     	 	   	  	 	  		    		 	 	  	  	 	   	 		 	 	 	
int f0_3(int ai_0) {
   if (Close[ai_0] > Open[ai_0]) return (1);
   return (0);
}
	    			 		 	 	   			 	  					 		 		 			 		 	  	   				  	 	    				 	   			 	 	 	 			    			 		 				 				   				  	           	      	   			  		
int f0_2(int ai_0) {
   if (Close[ai_0] < Open[ai_0]) return (1);
   return (0);
}
	 	 			 		    			  	  				 	 	     				 		      	 		 								  	 	 			 			 			  				 	 		  	  	 		 	  	  		 			   			  		 	 	   	 	 	 			  	     
double f0_0(int ai_0, int ai_4) {
   double ld_16;
   double ld_24;
   double ld_32;
   double ld_40 = High[ai_4];
   double ld_48 = Low[ai_4];
   double ld_56 = iBands(Symbol(), 0, BBPeriod, BBDev, 0, PRICE_CLOSE, MODE_BASE, ai_4);
   for (int li_8 = ai_4; li_8 < Bars; li_8++) {
      if (TimeHour(Time[li_8]) == gi_120 && TimeMinute(Time[li_8]) == 0) {
         ld_16 = Low[li_8 + 1];
         ld_24 = High[li_8 + 1];
         ld_32 = Close[li_8 + 1];
         for (int li_12 = li_8 + 1; li_12 < Bars; li_12++) {
            if (TimeHour(Time[li_12]) == gi_120 && TimeMinute(Time[li_12]) == 0) break;
            if (Low[li_12] < ld_16) ld_16 = Low[li_12];
            if (High[li_12] > ld_24) ld_24 = High[li_12];
         }
         break;
      }
   }
   double ld_64 = signalyzer(ai_0, ld_24, ld_16, ld_32, ld_40, ld_48, Close[ai_4], ld_56);
   if (ai_0 == 1 && ld_64 != 0.0) return (ld_64);
   if (ai_0 == 2 && ld_64 != 0.0) return (ld_64);
   return (0);
}

Recommend