Salve,
volevo sapere se era possibile tradurre l’indicatore Autoenvelope nel linguaggio di prorealtime.
Grazie!
Envelope channels should be set parallel to the slow moving average and contain
approximately 90-95% of all prices for the past two or three months, with only the
extremes protruding outside of a channel. Envelope channels provide attractive profit
targets – sell longs near the upper channel line and cover shorts near the lower channel
line.
The AutoEnvelope indicator is a tool for automatically creating channels that contain 90-95% of prices.
Penso che questo indicatore disponibile nella nostra biblioteca sia lo stesso?
Adaptive Enveloppe
Grazie per la risposta!
Eh, l’avevo già visto quell’indicatore, ma non convince molto. Funziona in modo diverso dall’Autoenvelope. Nel calcolo viene presa in considerazione la deviazione standard e quindi lavora in modo diverso.
Ho trovato la formula anche in formato Metastock, che mi sembra più semplice da tradurre del formato di metatrader. Poi domani vedo se riesco a replicarlo in formato prorealtime
MetaStock FORMULA
EMA:=Input("Base EMA",1,100,22);
Factor:=Input("Factor",1,50,27);
Avg:=Mov(C,EMA,E);
csize:= StDev(2*Max(abs(H-Avg) ,abs(L-Avg)) / Avg,100)*Factor/10;
{Use 100 days for stable channel size - default is 2.7 std}
Csize:= ValueWhen(1,
DayOfWeek()<Ref(DayOfWeek() ,-1) OR (
DayOfWeek()=Ref(DayOfWeek(),-1) AND DayOfMonth() <> Ref(DayOfMonth(),-1))
,Ref(csize,-1));
{ This pegs the StDev to last bar of week AND only changes once per week}
csize:=LastValue(csize);
{fix to constant using last value}
channel:=csize*Avg;
Avg+channel/2;
Avg-channel/2;
Avg;