SHARE
TWEET

Untitled

a guest Feb 19th, 2018 322 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //+------------------------------------------------------------------+
  2. //|                                                super-signals.mq4 |
  3. //|                Copyright © 2006, Nick Bilak, beluck[AT]gmail.com |
  4. //+------------------------------------------------------------------+
  5. #property copyright "Copyright © 2006, Nick Bilak"
  6. #property link      "http://www.forex-tsd.com/"
  7.  
  8. #property indicator_chart_window
  9. #property indicator_buffers 2
  10. #property indicator_color1 Red
  11. #property indicator_color2 Aqua
  12.  
  13. extern int SignalGap=10;
  14.  
  15. int dist=50;
  16. double b1[];
  17. double b2[];
  18.  
  19. //+------------------------------------------------------------------+
  20. //|                                                                  |
  21. //+------------------------------------------------------------------+
  22.   int init()  {
  23.    SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,1);
  24.    SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,1);
  25.    SetIndexArrow(1,233);
  26.    SetIndexArrow(0,234);
  27.    SetIndexBuffer(0,b1);
  28.    SetIndexBuffer(1,b2);
  29.    return(0);
  30.   }
  31. //+------------------------------------------------------------------+
  32. //|                                                                  |
  33. //+------------------------------------------------------------------+
  34.   int start() {
  35.    int counted_bars=IndicatorCounted();
  36.    int k,i,j,limit,hhb,llb;
  37.  
  38.    if (counted_bars<0) return(-1);
  39.    if (counted_bars>0) counted_bars--;
  40.    limit=Bars-1;
  41.    if(counted_bars>=1) limit=Bars-counted_bars-1;
  42.    if (limit<0) limit=0;
  43.  
  44.      for(i=limit;i>=0;i--)   {
  45.       hhb=Highest(NULL,0,MODE_HIGH,dist,i-dist/2);
  46.       llb=Lowest(NULL,0,MODE_LOW,dist,i-dist/2);
  47.  
  48.       if (i==hhb)
  49.          b1[i]=High[hhb]+SignalGap*Point;
  50.       if (i==llb)
  51.          b2[i]=Low[llb]-SignalGap*Point;
  52.      }
  53.    return(0);
  54.   }
  55.  
  56. //+------------------------------------------------------------------+
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top