1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
// Definizione dei parametri del codice DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate ID = high<high[1] and low>low[1] rang = range NR4 = rang<range[1] and rang<range[2] and rang<range[3] if ID and NR4 then test = 1 hh = highest[4](high) ll = lowest[4](low) endif if test = 1 then if time>=020000 and time <=050000 then BUY 1 SHARE AT hh STOP endif endif if test=1 then if time>=200000 and time <=220000 then sellshort 1 SHARE AT ll STOP endif endif if longonmarket and time >= 200000 and time<=220000 then SELL AT ll STOP test=0 elsif shortonmarket and time>=020000 and time<=050000 then EXITSHORT AT hh STOP test=0 endif |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
// Definizione dei parametri del codice DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate ID = high<high[1] and low>low[1] rang = range NR4 = rang<range[1] and rang<range[2] and rang<range[3] if ID and NR4 then test = 1 hh = highest[4](high) ll = lowest[4](low) endif if test = 1 then if time>=020000 and time <=050000 then BUY 1 SHARE AT hh STOP endif endif if test=1 then if time>=200000 and time <=220000 then sellshort 1 SHARE AT ll STOP endif endif if longonmarket and time >= 200000 and time<=220000 then SELL AT ll STOP elsif shortonmarket and time>=020000 and time<=050000 then EXITSHORT AT hh STOP endif |
Hi guys, i would like to know what is the difference from code 1 and code 2, what they do ?
thanks a lot