#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 CLR_NONE
#property indicator_color2 CLR_NONE
#property indicator_color3 Lime
#property indicator_color4 Red
#property indicator_width1 0
#property indicator_width2 0
#property indicator_width3 1
#property indicator_width4 1
extern bool Sound_Alert= true;
extern int Alert_Mode = 1;
extern bool Show_PriceBox=false;
extern int myBoxWidth=3;
extern int MA_Price=0;
extern int MA_Length=1;
extern int MA_Mode=0;
extern int ATR_Length=10;
extern double Volatil= 1.3;
extern double Factor = 0.0;
extern bool usePrice_HiLoBreak = true;
extern bool useMA_HiLoEnvelope = false;
double UpBuffer[];
double DnBuffer[];
double UpSignal[];
double DnSignal[];
double smin[];
double smax[];
double trend[];
int last=0;
string symbol,tChartPeriod,tShortName;
int digits,period;
bool Trigger;
int OldBars=-1;
int init()
{
// код доступен только после оплаты
}
int deinit()
{
ObjectDelete(tShortName+"01");
ObjectDelete(tShortName+"02");
return(0);
}
int start()
{
// код доступен только после оплаты
}
if(Bars!=OldBars) { Trigger=False; }
int shift,limit,counted_bars=IndicatorCounted();
if(counted_bars>0) limit=Bars-counted_bars;
if(counted_bars < 0) return(0);
if(counted_bars==0) limit=Bars-MA_Length-1;
for(shift=limit;shift>=0;shift--)
{
if(useMA_HiLoEnvelope)
{
double bprice=iMA(NULL,0,MA_Length,0,MA_Mode,2,shift);
double sprice=iMA(NULL,0,MA_Length,0,MA_Mode,3,shift);
}
else
{
bprice=iMA(NULL,0,MA_Length,0,MA_Mode,MA_Price,shift);
sprice=iMA(NULL,0,MA_Length,0,MA_Mode,MA_Price,shift);
}
smax[shift]=bprice + Volatil*iATR(NULL,0,ATR_Length,shift);
smin[shift]=sprice - Volatil*iATR(NULL,0,ATR_Length,shift);
trend[shift]=trend[shift+1];
if(usePrice_HiLoBreak)
{
if(High[shift] > smax[shift+1])trend[shift]= 1;
if(Low[shift] < smin[shift+1])trend[shift]=-1;
}
else
{
if(bprice > smax[shift+1])trend[shift]= 1;
if(sprice < smin[shift+1])trend[shift]=-1;
}
if(trПоказано первые 50% кода (символов: 5129)
Введите ваш email и нажмите кнопку, чтобы перейти к оплате.