//+------------------------------------------------------------------+ //| Brooky_Psar_Levels_V2.mq4 | //| Copyright © 2010, www.Brooky-Indicators.com. | //| http://www.www.Brooky-Indicators.com | //+------------------------------------------------------------------+ #property copyright "Copyright © 2010, www.Brooky-Indicators.com." #property link "http://www.www.Brooky-Indicators.com" extern string Hello_From=" www.Brooky-Indicators.com "; #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 DarkOrange #property indicator_color2 DodgerBlue #property indicator_width1 2 #property indicator_width2 2 #import "shell32.dll" int ShellExecuteA(int hwnd,string lpOperation,string lpFile,string lpParameters,string lpDirectory,int nShowCmd); #import //---- input parameters extern int bars_back= 240; extern double sar_step = 0.006; extern double sar_max=0.03; extern int level_style= 0; extern int price_size = 2; extern color lowpsar= DodgerBlue; extern color hipsar = DarkOrange; extern bool show_psar = true; extern bool see_price = false; //--- netlink extern bool Check_Latest=true; extern string Your_Internet_Browser="firefox.exe";//iexplore.exe extern int Link_Corner = 2; extern int Link_Offset = 20; string indi="Brooky-Psar V2"; //---- buffers double plow[]; double phi[]; string book="www.Brooky-Indicators.com.Updates.";// string bookrg="www.brooky-indicators.com/products-page/";// //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,158); SetIndexBuffer(0,plow); SetIndexEmptyValue(0,0.0); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,158); SetIndexBuffer(1,phi); SetIndexEmptyValue(1,0.0); IndicatorShortName(indi); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- ObjectDelete(book); ObjectDelete(bookrg); for(int j=0; j0) counted_bars--; int limit=Bars-counted_bars; if(counted_bars==0) limit--; if(limit>bars_back)limit=bars_back; //---- main loop double mysarnow,myopen,mysarb4,myopenb4,mysarb42,myopenb42; for(int i=0; i=myopen && mysarb4myopenb4) { phi[i]=mysarnow; string sup=indi+"Sup"+bardelete; ObjectCreate(sup,OBJ_HLINE,0,Time[i],mysarnow); ObjectSet(sup,OBJPROP_STYLE,level_style); ObjectSet(sup,OBJPROP_COLOR,lowpsar); ObjectSet(sup,OBJPROP_RAY,1); string sup2=indi+"Sup2"+bardelete; ObjectCreate(sup2,OBJ_HLINE,0,Time[i],mysarb4); ObjectSet(sup2,OBJPROP_STYLE,level_style); ObjectSet(sup2,OBJPROP_COLOR,lowpsar); ObjectSet(sup2,OBJPROP_RAY,1); if(see_price) { string nameu=indi+"aUp"+bardelete; ObjectCreate(nameu,OBJ_ARROW,0,Time[i],mysarnow); ObjectSet(nameu,OBJPROP_STYLE,STYLE_SOLID); ObjectSet(nameu,OBJPROP_ARROWCODE,5); ObjectSet(nameu,OBJPROP_COLOR,lowpsar); ObjectSet(nameu,OBJPROP_WIDTH,price_size); } }else if(show_psar && iSAR(NULL,0,sar_step,sar_max,i)ddelay) { dlastbar=dcurbar; return (true); } else { return(false); } } //+------------------------------------------------------------------+