//+------------------------------------------------------------------+ //| Giant Bar.mq4 | //| Novice | //| ver. 03 | //| Robert Hill: ver. 03 - changed to work on timeframes less than | //| hourly | //| John Smith: added visual part but does not work properly | //+------------------------------------------------------------------+ #property indicator_chart_window extern int barsolidheight=30; extern int alertinterval=120; string barbody=""; int NextMinute=0; int NextPeriod=0; double mOpen, mClose, mDif; double bsh; double GiantBULL[]; double GiantBEAR[]; int init() { bsh = barsolidheight*Point; NextMinute = Minute(); return (0); } int start() { mClose = iClose(0,0,0); mOpen = iOpen(0,0,0); mDif = MathAbs(mClose - mOpen); if(mDif > bsh) { if( Minute()>=NextMinute) { if (NextPeriod == 0) { if(mClose>mOpen) { ObjectCreate("GiantBULL",OBJ_ARROW,0,Time[0],iOpen(0,0,0)-20*Point); // offset arrow by 20 pips from Open ObjectSet("GiantBULL",OBJPROP_ARROWCODE,SYMBOL_THUMBSUP); ObjectSet("GiantBULL",OBJPROP_COLOR,Turquoise); barbody=" min. - BULL candle moved "; } else if(mClose < mOpen) { ObjectCreate("GiantBEAR",OBJ_ARROW,0,Time[0],iOpen(0,0,0)+20*Point); ObjectSet("GiantBEAR",OBJPROP_ARROWCODE,SYMBOL_THUMBSDOWN); ObjectSet("GiantBEAR",OBJPROP_COLOR,Magenta); barbody=" min. - BEAR candle moved "; } Alert(Symbol()," ",Period(),barbody,mDif/Point," pip(s)"); NextMinute=Minute()+alertinterval; NextPeriod = 1; if(NextMinute>=Period()) {NextMinute-=Period();NextPeriod=0;} } } } return(0); }
Sample
Analysis
Market Information Used:
Series array that contains close prices for each bar
Series array that contains open prices of each bar
Series array that contains open time of each bar
Indicator Curves created:
Indicators Used:
Custom Indicators Used:
Order Management characteristics:
Other Features:
It issuies visual alerts to the screen