//+------------------------------------------------------------------+ //| SSL channel chart.mq4 | //| mladen | //| | //| initial SSL for metatrader developed by Kalenzo | //+------------------------------------------------------------------+ #property copyright "mladen" #property link "mladenfx@gmail.com" //---- #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Green #property indicator_width1 2 #property indicator_width2 2 //---- extern int Lb =10; extern bool alertsOn =false; extern bool alertsMessage=true; extern bool alertsSound =false; extern bool alertsEmail =false; //---- double ssld[]; double sslu[]; double Hlv[]; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(3); SetIndexBuffer(0,ssld); SetIndexDrawBegin(0,Lb+1); SetIndexBuffer(1,sslu); SetIndexDrawBegin(0,Lb+1); SetIndexBuffer(2,Hlv); return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(); if(counted_bars < 0) return(-1); if(counted_bars > 0) counted_bars--; int limit = Bars - counted_bars; if(counted_bars==0) limit-=1+1; //---- for(int i=limit;i>=0;i--) { Hlv[i]=Hlv[i+1]; if(Close[i]>iMA(Symbol(),0,Lb,0,MODE_SMA,PRICE_HIGH,i+1)) Hlv[i]= 1; if(Close[i]