TS beta - medio/lungo periodo | Azionario - di ale73a (1 Viewer)

f4f

翠鸟科
a voler essere pignoli........il codice del candelier è solo questo...



Codice:
Var: Stop1, Stop2, StopLong, StopShort, PREV, Chandelier(0),OscAtr3, OscAtr25;
Var: contahl,prox0,indzona1,pp,llow,hhigh,aa, bb,expoa,expob,dd,indzona2;
/////////////////////////////////////////////////////////////////////////////////
OscAtr3 = ATR(C, 10) * 3;
OscAtr25 = ATR(C, 10) *2.5;

PREV = [COLOR=Red][B]Chandelier[1];[/B][/COLOR]

if PREV < L THEN
if (H - OscAtr3) >= PREV then
Stop1 = H - OscAtr3;
else
Stop1 = PREV;
endif;
else
Stop1 = H - OscAtr3;
endif;

if PREV < l then
if (C - OscAtr25) >= PREV then
Stop2 = C - OscAtr25;
else
Stop2 = prev;
endif;
else
Stop2 = C - OscAtr25;
endif;


If Stop1 > Stop2 then
StopLong = Stop1;
else
StopLong = Stop2;
endif;


if PREV > H then
if (L + OscAtr3) <= PREV then
Stop1 = L + OscAtr3;
else
Stop1 = PREV;
endif;
else
Stop1 = L + OscAtr3;
endif;


if (PREV > H) then
if (C + OscAtr25) <= PREV then
Stop2 = C + OscAtr25;
else
Stop2 = PREV;
endif;
else
Stop2 = C + OscAtr25;
endif;


If Stop1 < Stop2 then
StopShort = Stop1;
else
StopShort = Stop2;
endif;


if BarSince(L > StopLong[1]) > BarSince(H < StopShort[1]) then
Chandelier = StopLong;
else
Chandelier = StopShort;
endif;


PlotChart(Chandelier, 0, blue, solid, 2);

sono molto incuriosito dal codice del chandelier
nel listato qui sopra però chandelier è utilizzato come function.....
 

ale73a

break even trader
Che vuol dire chandelier e usato come function? Spiegati.
forse intendeva che, copiandolo in un ts, non gli vengono dati i segnali long e short :-?
cambiando discorso...quanto non attendibile è "CHECKMAX+EXITONLYIFCLOSEON" inserito nel trailing profit? credevo di averne capito la logica ma vedendo le uscite non me lo spiego tanto bene,...
 

f4f

翠鸟科
Che vuol dire chandelier e usato come function? Spiegati.


grazie anzitutto
premessa: non conosco VT e vorrei testare Chandelier con excel

nel listato visto sopra, PREV è definito come pari al Chandelier del giorno prima;
ma non ho trovato una riga in cui si definisce Chandelier , cioè in questo formato:
Chandelier= ema(C,25) (ad esempio)

quindi ( nella mia interpretazione) Chnadelier è definito da un altro programma o è una funzione pre-caricata, come EMA(C,25) ad esempio

mi potete aiutare??
grazie :):)
 

Simgen

Sempre. Comunque.
grazie anzitutto
premessa: non conosco VT e vorrei testare Chandelier con excel

nel listato visto sopra, PREV è definito come pari al Chandelier del giorno prima;
ma non ho trovato una riga in cui si definisce Chandelier , cioè in questo formato:
Chandelier= ema(C,25) (ad esempio)

quindi ( nella mia interpretazione) Chnadelier è definito da un altro programma o è una funzione pre-caricata, come EMA(C,25) ad esempio

mi potete aiutare??
grazie :):)

penso semplicemente che il valore iniziale del calcolo sia 0 (chandelier[1]) poi usa quello calcolato e così via, non vedo il problema.
 

Damien

Nessuno è mai al sicuro
grazie anzitutto
premessa: non conosco VT e vorrei testare Chandelier con excel

nel listato visto sopra, PREV è definito come pari al Chandelier del giorno prima;
ma non ho trovato una riga in cui si definisce Chandelier , cioè in questo formato:
Chandelier= ema(C,25) (ad esempio)

quindi ( nella mia interpretazione) Chnadelier è definito da un altro programma o è una funzione pre-caricata, come EMA(C,25) ad esempio

mi potete aiutare??
grazie :):)

PREV= Chandelier[1] è un riferimento al linguaggio Metastock, nel quale PREV rappresenta automaticamente la variabile precedente, mentre in VT questa assegnazione va fatta.

Non hai trovato una riga in cui si assegna Chandelier?
Guarda meglio in fondo al codice, dove si dice che il valore dello Chandelier è uguale di volta in volta allo StopLong o StopShort.

Ciao.
 
chandelier per prorealtime

Mi sono cimentato nella traduzione su prorealtime. L'unica particolarità è la mancanza dell'istruzione barsince che spero di aver reso bene, non avendo un manuale di VT e quindi non sapendo perfettamente il significato dell'istruzione.
Qualcuno che ha VT e prorealtime può controllare se ci sono differenze sostanziali nel grafico? grazie

ecco il codice per Prorealtime

OscAtr3 = averagetruerange[10](close)*3
OscAtr25 = averagetruerange[10](close)*2.5

PREV = Chandelier[1]

if PREV < Low THEN
if (High - OscAtr3) >= PREV then
Stop1 = High - OscAtr3
else
Stop1 = PREV
endif
else
Stop1 = High - OscAtr3
endif

if PREV < low then
if (Close - OscAtr25) >= PREV then
Stop2 = Close - OscAtr25
else
Stop2 = prev
endif
else
Stop2 = Close - OscAtr25
endif


If Stop1 > Stop2 then
StopLong = Stop1
else
StopLong = Stop2
endif


if PREV > High then
if (Low + OscAtr3) <= PREV then
Stop1 = Low + OscAtr3
else
Stop1 = PREV
endif
else
Stop1 = Low + OscAtr3
endif


if (PREV > High) then
if (Close + OscAtr25) <= PREV then
Stop2 = Close + OscAtr25
else
Stop2 = PREV
endif
else
Stop2 = Close + OscAtr25
endif


If Stop1 < Stop2 then
StopShort = Stop1
else
StopShort = Stop2
endif

If Low > stoplong[1] then
GLow=Glow+1
else
Glow=0
endif

If High < Stopshort[1] then
Ghigh=Ghigh+1
else
Ghigh=0
endif


if Glow > Ghigh then
Chandelier = StopLong
else
Chandelier = StopShort
endif

if close > chandelier then
col=1
else
col=-1
endif

Return Chandelier coloured by col
 

f4f

翠鸟科
PREV= Chandelier[1] è un riferimento al linguaggio Metastock, nel quale PREV rappresenta automaticamente la variabile precedente, mentre in VT questa assegnazione va fatta.

Non hai trovato una riga in cui si assegna Chandelier?
Guarda meglio in fondo al codice, dove si dice che il valore dello Chandelier è uguale di volta in volta allo StopLong o StopShort.

Ciao.


grazie
il problema è che non conosco il linguaggio
in VB la dichiarazione delle variabili è diversa


ciao :)
 

Users who are viewing this thread

Alto