input : ÃÑÅõÀÚ±Ý(4500000), period1(20); var : L15(0),cnt(0),sum(0),count(0); sum = 0; for count = 1 to Period1{ sum = sum + max(abs(dayclose(count+1)-DayHigh(count)),abs(Dayclose(count+1)-DayLow(count)),abs(dayhigh(count)-daylow(count))); } value1 = sum/period1; #Àϰ£ 20 ATR value2 = int(((ÃÑÅõÀÚ±Ý*0.01)/(value1*3))/10)*10; value6 = 35100; #¹Ú½º±Ç»ó´Ü value7 = 32800; #¹Ú½º±Ç±Í¼Ó #ÀüÀÏ ±âÁØ 15ÀÏ ÃÖÀú°¡ L15 = DayLow(1); for cnt = 1 to 15{ if DayLow(cnt) < L15 Then L15 = DayLow(cnt); } if MarketPosition == 0 and stime < 150000 and sdate >= 20100825 and ExitDate(1) != sdate Then{ if H <= value6 Then# ¸Å¼ö°¡°Ý´ë µ¹ÆÄ½Ã ¸Å¼ö. buy("¹Ú½º±ÇÀÌÅ»¸Å¼ö",AtStop,value6+PriceScale,value2); } #ÁøÀÔÀÌ ÀÖÀ» ¶§¸¶´Ù value3¿¡ value1ÀúÀå value4¿¡ ÇØ´çºÀ °í°¡ÀúÀå if MarketPosition == 1 and CurrentEntries > CurrentEntries[1] Then{ value3 = value1; value4 = H; } if MarketPosition == 1 and ExitDate(1) != sdate Then{ if CurrentEntries == 1 Then{ buy("ÇǶó¹Ìµù2",AtStop,H[BarsSinceEntry]+value3+PriceScale,value2); } if CurrentEntries == 2 Then{ buy("ÇǶó¹Ìµù3",AtStop,value4+value3+PriceScale,value2); } if CurrentEntries == 3 Then{ buy("¸¶Áö¸·ÇǶó¹Ìµù",AtStop,value4+value3+PriceScale,value2); } } if MarketPosition == 1 Then{ if L >= L15-PriceScale Then# ºÎµîÈ£°¡ ¹Ý´ëÀ̾î¾ß L7-PriceScale À§¿¡ ÀÖ´Ù°¡ ³»·Á°¡¸é û»êÀÔ´Ï´Ù. exitlong("½ÅÀú°¡",AtStop,L15-PriceScale); if L >= value4-value3*3 then # value4-value3*3 À§¿¡ ÀÖ´Ù°¡ ³»·Á°¡¸é û»êÀÔ´Ï´Ù. exitlong("º¯µ¿¼º",AtStop,value4-value3*3); if L >= value6-value3*3 Then exitlong("¼Õ½Çû»ê",atstop,value6-value3*3); #¹Ú½º±ÇÇÏÇâÇϸé û»ê. if L >= value7 Then exitlong("¹Ú½º±Ç±Í¼Ó",atstop,value7-pricescale); #¹Ú½º±ÇÇÏÇâÇϸé û»ê. }