autotrader
Forumer attivo
OK, appena posso provo a replicare il codice con amibroker.
Io passai ad Amibroker su consiglio di Ender85 che oramai non scrive più, e che ringrazio ancora. Ci puoi fare quello che vuoi. La piattaforma costa poco più di 200 euro. Cmq poi la devi collegare ad un broker se vuoi dati in tempo reale, io la uso solo per backtest ed i dati glieli do con file di testo.PS: come ti trovi con Amibroker? Prezzi, linguaggio, affidabilità dei backtest (es ti da anche il tick by tick all'interno delle candele?)
K
{******************************************************************************
Entra nel gap se è compreso nei parametri,
TP=ST = al valore massimo dell'ultima barra a 5 min del giorno prima
******************************************************************************}
Var: prova(0), chiusura, apertura, differenza, value,Par,ParM; // Agggiungere qui le variabili che vi servono
Par=40;
ParM=200;
SECTION_ENTERLONG:
if IsFirstBarDay then
If IsDownGap then
chiusura=H[1];
differenza=C[1]-O[0];
if (differenza>=Par)and (differenza<=ParM)then
buy(this,nextbar,atOpen,1);
endif;
endif;
endif;
END_SECTION
SECTION_EXITLONG:
value=varperc(differenza,chiusura);
InstalltakeProfit(INPERC, value, "take");
InstalltakeProfit(INPERC, value, "st");
if T > 1715 then
sell(this,nextbar,atOpen,1);
endif;
END_SECTION
SECTION_ENTERSHORT:
if IsFirstBarDay then
If IsUpGap then
chiusura=H[1];
differenza=O[0]-C[1];
if (differenza>=Par)and(differenza<=ParM)then
//sell(this, bar, atClose, 1);
sell(this,nextbar,atOpen,1);
endif;
endif;
endif;
END_SECTION
SECTION_EXITSHORT:
value=varperc(differenza,chiusura);
InstalltakeProfit(INPERC,value, "take");
InstalltakeProfit(INPERC,value, "st");
if T > 1715 then
buy(this,nextbar,atOpen,1);
endif;
END_SECTION