Grazie per la risposta esaustiva.. ora però mi piacerebbe capire come mai in questo caso gli ordini non partono con cadenza 5 min… si è appena verificata la situazione per cui sarebbe dovuto partire e invece niente.. allego il codice fresco fresco grazie //------------------------------------------------------------------------- // Codice principale : Price action //------------------------------------------------------------------------- // Definizione dei parametri del codice DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate // Il sistema cancellerà tutti gli ordini in attesa e chiuderà tutte le posizioni a 0:00. Dopo l'orario "Flat Before" non saranno piazzati nuovi ordini o posizioni. DEFPARAM FLATBEFORE = 090000 // Cancellare tutti gli ordini in attesa e chiudere tutte le posizioni all'orario "Flat After" DEFPARAM FLATAFTER = 201500 // Impedisce al sistema di tradare in giorni specifici della settimana daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0 or OpenDayOfWeek = 1 c1=not daysForbiddenEntry timeframe (daily,UpdateOnClose) levup=75 // % ratio1 levdw=25 // % ratio1 ratio1=abs(high-low) Dbot=min(high,low) Dtop=max(high,low) bodyrange=(abs(close-open))/pointsize limitBuy=(dtop > ((ratio1/100)*levup)+low) and close > open limitSell=(dbot < ((ratio1/100)*levdw)+low) and open > close sllong=(abs(dtop-close))/pointsize slshort=(abs(close-dbot))/pointsize timeframe(5mn, UpdateOnClose ) IF intradaybarindex = 0 then countposition=0 endif count=countposition < 1 if c1 and limitbuy and count and close crosses over dtop then buy 1 contract at dtop stop countposition=countposition + 1 endif set target pprofit (bodyrange * 0.8) set stop ploss sllong if c1 and limitsell and count and close crosses under dbot then sellshort 1 contract at dbot stop countposition=countposition + 1 endif set target pprofit (bodyrange * 0.8) set stop ploss slshort