Var: super,flag,flagh,mioatr,miocci,mrange,st(0),molt(3 ),trendup,trenddown,indzona1,trend(1),changetrend;
mioatr=atr(c,10);
trendup=avgprice+(molt*mioatr);
trenddown=avgprice-(molt*mioatr);
if c>trendup[1] then
trend=1;
else
if c<trenddown[1] then
trend=-1;
endif;
endif;
if trend<0 and trend[1]>0 then
flag=1;
else
flag=0;
endif;
if trend>0 and trend[1]<0 then
flagh=1;
else
flagh=0;
endif;
if trend>0 and trenddown<trenddown[1] then
trenddown=trenddown[1];
endif;
if trend<0 and trendup>trendup[1] then
trendup=trendup[1];
endif;
if flag=1 then
trendup=avgprice+(molt*mioatr);
endif;
if flagh=1 then
trenddown=avgprice-(molt*mioatr);
endif;
if trend=1 then
super=trenddown;
else
super=trendup;
endif;
PlotChart(super, 0, green, solid, 3);.......................e' la stessa formula che ho trovato anch'io scorrendo le pagine di questa discussione.Domani la verifico con quella che ho sulla t3 e ti faccio sapere. Comunque grazie per la collaborazione.