Disliked{quote} I would suggest you go about it with something along these lines: //main level // Some external vars: input bool AlertsEnabled = true; input double MaxTinyWick_pips = 1.0; // A wick <= 1.0 "true" pips // Some global vars: double myPoint, maxWickDiff; //Put in OnInit: myPoint = Point*MathPow(10,Digits%2); maxWickDiff = MaxTinyWick_pips * myPoint; // Put in OnCalculate: static datetime last_bartime; int newbar = false; if(last_bartime > 0 && time[0] != last_bartime) newbar = true; last_bartime = time[0]; if(newbar && AlertsEnabled) { // A...Ignored

Inserted Code

//+------------------------------------------------------------------+ //| test.mq4 | //| Copyright 2017, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2017, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 LimeGreen //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ extern bool ShowArrows=true; extern bool AlertsEnabled=true; extern double MaxTinyWick_pips=0.0; // A wick <= 1.0 "true" pips double myPoint; double maxWickDiff; double UpArrow[]; double DnArrow[]; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(2); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,234); SetIndexBuffer(0,UpArrow); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,233); SetIndexBuffer(1,DnArrow); myPoint=Point*MathPow(10,Digits%2); maxWickDiff=MaxTinyWick_pips*myPoint; //--- indicator buffers mapping //--- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { static datetime last_bartime; int newbar=false; if(last_bartime>0 && time[0]!=last_bartime) newbar=true; last_bartime=time[0]; if(newbar && AlertsEnabled) { //if( high[1]-close[1] == maxWickDiff || close[1]-low[1] == maxWickDiff) Alert(Symbol(),"Just finished tiny wick at CLOSE of bar"); //if( high[1]-open[1] <= maxWickDiff || open[1]-low[1] <= maxWickDiff) Alert(Symbol(),"Just finished tiny wick at OPEN of bar"); if(high[1]-close[1]==maxWickDiff) { Alert(Symbol()," SELL "); UpArrow[1]=High[1]+5*Point; if(close[1]-low[1]==maxWickDiff) { Alert(Symbol()," BUY "); DnArrow[1]=Low[1]-5*Point; } } } //--- return value of prev_calculated for next call return(0); } //+------------------------------------------------------------------+