// Definizione dei parametri del codice
DEFPARAM CumulateOrders = false // Posizioni cumulate disattivate
DEFPARAM FLATBEFORE = 075900
DEFPARAM FLATAFTER = 215900
// Impedisce al sistema di tradare in giorni specifici della settimana
daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
//OpenDayOfWeek = 1 OR OpenDayOfWeek = 2 OR OpenDayOfWeek = 3 OR OpenDayOfWeek = 4 OR OpenDayOfWeek = 5
timeframe (1h)
vola=averagetruerange [5] (close)
long=close[1]+(vola[1]*0.125)
short=close[1]-(vola[1]*0.125)
target0=close[1]
vv=vola[1]*0.25
timeframe (1 mn)
c1 = close>long+5
c2 = close<short-5
if not onmarket and c1 then
sellshort 10 contract at long stop
endif
if not onmarket and c2 then
buy 10 contract at short stop
endif
SET STOP ploss 10
SET TARGET pPROFIT 20