Per accontentare anche i lettori che hanno richiesto il codice Aberration3 per Visual Trader lo potete copiare e incollare nell’editor qui in basso in formato txt.

La descrizione della strategia la trovate invece a questa pagina.

Ricordo ai lettori che cambiando linguaggio, piattaforma e dati i risultati possono differire in modo sensibile e potrebbe essere necessario ritarare i parametri.

//ABERRATIONCUBE
Input: SDev1(1.5), SDev2(1);
Var: Upband(0), DnBand(0), Medband(0), lun(20), StdDevUp(1), StdDevDn(-1), BandWidth(0), Numdays(20);

If dmadx(c, 10) > 25
Then

If positiondir = 0
and C > (Mov(c,40,s) + (SDev1 * StdDev(c,40,0)))
then enterlong(nextbar, atopen);
endif;
If positiondir = 1 and C <(Mov(c, 40,s))
then exitlong(nextbar, atopen);
endif;

If positiondir = 0
and C < (Mov(c,40,s) – (SDev2 * StdDev(c,40,0)))
then entershort(nextbar, atopen);
endif;
If positiondir = -1 and C > (Mov(c, 40,s))
then exitshort(nextbar, atopen);
endif;
endif;
installtrailingprofit(Inperc, 0.7, 0.3);