// TRIX SIGNAL by Enrico Malveri
// “I Consigli dei Grandi Trader” , Hoepli, 2015
// translated in ProRealTime language by Saucius
DEFPARAM CumulateOrders = False
TR1 = Trix[9](customclose)
c1 = (TR1 crosses over 0)
c2 = (TR1 crosses under 0)
// alternative.. = TRIX[n](customclose), where n is to be optimized. Default n = 9
// Condizioni per entrare long/short – long/short entry conditions
If not shortonmarket and c1 then
buy 2 shares at market
elsif not longonmarket and c2 then
sellshort 2 shares at market
endif
// Stop conditions
SARS = SAR[0.01,0.03,0.2]
// alternative SAR [a,m,h] where a,m,h should be optimized
c3 = (close crosses under sars)
c4 = (close crosses over sars)
if c3 then
sell at market
elsif c4 then
exitshort at market
endif
//eventually,
//SET STOP LOSS x %TRAILING y
//SET STOP %PROFIT z
==> VERY VERY NICE T.S. ON FTSEMIB
Results after optimization