ciao è il mio primo topic quindi spero di non essere troppo sciocco o invadente
Sto provando a gestire una strategia su più TIMEFRAME e per carcare di capire come si comporta ho visualizzato in grafico i dati ottenuti ma non capisco perchè i risultati di una CALL in certi momenti siano come bloccati e fissi mentre in altri sono corretti. Ho allegato il programma (DAX_TFmulti) che sto testando e il programma dell’indicatore chiamato (HalfTrend) nonchè due screenshot dove si vede chiaramente che in quello chiamato “DAX_TFmulti ok” i dati calcolati nei vari timeframe coincidono mentre nell’altro screenshot sono completamente diversi e rimangono diversi per periodi di tempo diversi a volte anche per ore ??
Se potete aiutarmi vi sarei veramente grato xchè io non ci arrivo
Grazie 1000 comunque
A meno che non sia un file lunghissimo (centinaia di linee), è sempre meglio, oltre ad allegare il file ITF, anche postare il testo del codice:
defparam preloadbars=200
DEFPARAM CumulateOrders = False
DEFPARAM FLATbefore = 073000
DEFPARAM FLATafter = 183000
startrade=090000
stoptrade=173000
once numcontr=0.5
timeframe(15 minutes)
HT15 = CALL "PRC_HalfTrend"[2]
timeframe(5 minutes,updateonclose)
HT05x = CALL "PRC_HalfTrend"[2]
LSMA05=EndPointAverage[7](close)
EMA05=ExponentialAverage[4](close)
CCI05=CCI[14](typicalPrice)
timeframe(5 minutes)
HT05 = CALL "PRC_HalfTrend"[2]
timeframe(default,updateonclose) // 1 min
xbuy=0
xsell=0
exitlg=0
exitsh=0
HT = CALL "PRC_HalfTrend"[2]
LSMA=EndPointAverage[7](close)
if LSMA>HT and LSMA>HT05 and LSMA>HT15 then
xbuy=1
elsif LSMA<HT and LSMA<HT05 and LSMA<HT15 then
xsell=1
endif
if ShortOnMarket then
//if ..... then
//exitsh=1
elsif LongOnMarket then
//if ..... then
//exitlg=1
endif
stopd=50
if not onmarket and time >= startrade and time <= stoptrade then
IF xbuy then
BUY numcontr CONTRACTS AT MARKET
SET STOP PTRAILING stopd
elsIF xsell then
sellSHORT numcontr contrACTS AT MARKET
SET STOP PTRAILING stopd
endif
endif
IF LongOnMarket then
if xsell and time >= startrade and time <= stoptrade then
sell at market
sellSHORT numcontr contrACTS AT MARKET
SET STOP PTRAILING stopd
elsIF exitlg then
sell at market
endif
ENDIF
IF ShortOnMarket then
IF xbuy and time >= startrade and time <= stoptrade then
exitshort at market
BUY numcontr CONTRACTS AT MARKET
SET STOP PTRAILING stopd
elsIF exitsh then
exitshort at market
ENDIF
ENDIF
GRAPH 0 COLOURED (0,250,0) as "0"
GRAPH CCI05 COLOURED (0,0,255) as "CCI05"
GRAPHonPRICE HT05 COLOURED (250,0,0) as "HT05"
GRAPHonPRICE HT05x COLOURED (0,0,250) as "HT05x"
GRAPHonPRICE HT15 COLOURED (250,50,250) as "HT15"
GRAPHonPRICE HT COLOURED (0,50,0) as "HT"
GRAPHonPRICE LSMA05 COLOURED (0,0,0) as "LSMA05"
Prova a commentare la riga 1 (le barre precaricate), o addirittura lasciarla ma scriverci 10000 (è il massimo).
intanto grazie Roberto anche x la velocità della risposta !
purtroppo sia commentando che portando a 10000 le barre precaricate non cambia di una virgola…
Anch’io ho notato delle differenze, ma non riesco a identificarne il motivo.
Prova a chiedere direttamente a PRT, premendo Ctrl+M dalla piattaforma, oppure telefonandogli.