Ciao Capt
eccolo
indicator1 =Average[27](close)
indicator2 =Average[110](close)
c1 = (indicator1 CROSSES OVER indicator2)
c2 = (indicator1 CROSSES UNDER indicator2)
if onmarket then
n=n+1
endif
if n=m then
if longonmarket then
sell at market thisbaronclose
elsif shortonmarket then
exitshort at market thisbaronclose
endif
n=0
endif
IF c1 and not onmarket THEN
BUY 1000 shares AT MARKET thisbaronclose
ENDIF
IF c2 and not onmarket THEN
SELLSHORT 1000 shares AT MARKET thisBaronclose
ENDIF