input : ÃÑÅõÀÚ±Ý(4500000), period1(20); var : L10(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; value4 = 13450; #ÀÌÀÍû»ê±¸°£ value6 = 12300; #¹Ú½º±Ç»ó´Ü value7 = 11600; #¹Ú½º±Ç±Í¼Ó #ÀüÀÏ ±âÁØ 10ÀÏ ÃÖÀú°¡ L10 = DayLow(1); for cnt = 1 to 10{ if DayLow(cnt) < L10 Then L10 = DayLow(cnt); } #1Â÷ #value6 »óÇâµ¹ÆÄ¶§ ¸Å¼ö if MarketPosition == 0 and stime < 150000 and sdate >= 20100801 and ExitDate(1) != sdate Then{ if H <= value6 Then# ¸Å¼ö°¡°Ý´ë µ¹ÆÄ½Ã ¸Å¼ö. buy("first_",AtStop,value6+PriceScale,value2); } #2Â÷ if MarketPosition == 1 Then{ #ÁøÀÔÀÌ ÀÖÀ» ¶§¸¶´Ù value3¿¡ value1ÀúÀå value4¿¡ ÇØ´çºÀ °í°¡ÀúÀå if CurrentEntries > CurrentEntries[1] Then{ value3 = value1; value4 = H; } #ù¹øÂ° ÇǶó¹Ìµù if CurrentEntries == 1 Then{ if H <= value6+value1 Then buy("up_", AtStop, value6+value1,value2);# value6+value1 À̻󿡼­ ÁøÀÔ } } #û»ê Æ÷Áö¼ÇÀÌ 3¹ø ´©ÀûÀÌÈÄ¿¡ ¹ßµ¿ if MarketPosition == 1 Then{ if L >= L10-PriceScale Then# L7-PriceScale À§¿¡ ÀÖ´Ù°¡ ³»·Á°¡¸é û»êÀÔ´Ï´Ù. exitlong("L10",AtStop,L10-PriceScale); if L >= value4-value3*3 then # value4-value3*3 À§¿¡ ÀÖ´Ù°¡ ³»·Á°¡¸é û»êÀÔ´Ï´Ù. exitlong("º¯µ¿¼º2",AtStop,value4-value3*3); if L >= value6-value3*3 Then exitlong("º¯µ¿¼º3",atstop,value6-value3*3); #¹Ú½º±ÇÇÏÇâÇϸé û»ê. if L >= value7 Then exitlong("¹Ú½º±Ç±Í¼Ó",atstop,value7-pricescale); #¹Ú½º±ÇÇÏÇâÇϸé û»ê. }