Input : shortPeriod(5), midPeriod(10), longPeriod(20), longPeriod1(60), longPeriod2(120), longPeriod3(240), longPeriod4(720), rsiPeriod(10), LPercent(30), Fline(999999999999), SPercent(70), volPeriod(5), sto5period(5), sto5period1(3), sto5period2(3), sto10period(10), sto10period1(6), sto10period2(6), sto20Period(20), sto20Period1(12), sto20Period2(12), sto65Period(65), sto65Period1(39), sto65Period2(39), sto130Period(130), sto130Period1(78), sto130Period2(78),simPeriod(10), disph(105.01), dispL(94.99), dispL1(90), simh(70), simL(30), stoh(80), stoL(20), barperiod(10), Faddsto(1), Flosscutrate(0.015), Faddbox(0.2), Fdepvaluemin(1.1), Fdepvaluemin1(1.5), Fdepvaluemin2(1.8), Fdepvaluemid(3), Fdepvaluemax(5), Fd4depvaluemax(7), Fdepratemin(0.006), Fdepratemin1(0.01), Fdepratemin3(0.015), Fdepratemid(0.02), Fdepratemid1(0.025), Fdepratemid3(0.03), Fdepratemax(0.05), Flpdepmin(0.03), Flpdepmid(0.1), Fcontby2(2), Fcontreg(2), Fcont5min(2); var : Bcontby2(0), Bcontreg(0), Bcont5min(0), Scontby2(0), Scontreg(0), Scont5min(0), sp(0), mp(0), lp(0), lp1(0), lp2(0), lp3(0), lp4(0), rp(0), vp(0), bidask(0), sto5k(0), sto5d(0), sto10k(0), sto10d(0), sto20k(0), sto20d(0), sto65k(0), sto65d(0), sto130k(0), sto130d(0), upV(0), upV1(0), upV2(0), downV(0), downV1(0), downV2(0), tupV(0), tupV1(0), tupV2(0), tdownV(0), tdownV1(0), tdownV2(0), downupV(0), downupV1(0), downupV2(0), updownV(0), updownV1(0), updownV2(0), maxupV(0), maxdownV(0), minupV(0), mindownV(0), sph1(0), sph2(0), sph3(0), spL1(0), spL2(0), spL3(0), mph1(0), mph2(0), mpL1(0), mpL2(0), lph1(0), lph2(0), lpL1(0), lpL2(0), lp1L1(0), lp1L2(0), lp1h1(0), lp1h2(0), lp2L1(0), lp2L2(0), lp2h1(0), lp2h2(0), spL1bar(0), spL2bar(0), sph1bar(0), sph2bar(0), mpL1bar(0), mpL2bar(0), mph1bar(0), mph2bar(0), lpL1bar(0), lpL2bar(0), lph1bar(0), lph2bar(0), lp1L1bar(0), lp1L2bar(0), lp1h1bar(0), lp1h2bar(0), lp2L1bar(0), lp2L2bar(0), lp2h1bar(0), lp2h2bar(0), sto5kh1(0), sto5kh2(0), sto5kL1(0), sto5kL2(0), sto5dh1(0), sto5dh2(0), sto5dh3(0), sto5dL1(0), sto5dL2(0), sto5dL3(0), sto10kh1(0), sto10kh2(0), sto10kh3(0), sto10kL1(0), sto10kL2(0), sto10kL3(0), sto10kh1bar(0), sto10kh2bar(0), sto10kL1bar(0), sto10kL2bar(0), sto10dh1(0), sto10dh2(0), sto10dh3(0), sto10dL1(0), sto10dL2(0), sto10dL3(0), sto10dh1bar(0), sto10dh2bar(0), sto10dL1bar(0), sto10dL2bar(0), sto20kh1(0), sto20kh2(0), sto20kh3(0), sto20kL1(0), sto20kL2(0), sto20kL3(0), sto20kh1bar(0), sto20kh2bar(0), sto20kL1bar(0), sto20kL2bar(0), sto20dh1(0), sto20dh2(0), sto20dh3(0), sto20dL1(0), sto20dL2(0), sto20dL3(0), sto20dh1bar(0), sto20dh2bar(0), sto20dL1bar(0), sto20dL2bar(0), sto65kh1(0), sto65kh2(0), sto65kL1(0), sto65kL2(0), sto65kh1bar(0), sto65kh2bar(0), sto65kL1bar(0), sto65kL2bar(0), sto65dh1(0), sto65dh2(0), sto65dh3(0), sto65dL1(0), sto65dL2(0), sto65dL3(0), sto65dh1bar(0), sto65dh2bar(0), sto65dL1bar(0), sto65dL2bar(0), sto130kh1(0), sto130kh2(0), sto130kL1(0), sto130kL2(0), sto130kh1bar(0), sto130kh2bar(0), sto130kL1bar(0), sto130kL2bar(0), sto130dh1(0), sto130dh2(0), sto130dh3(0), sto130dL1(0), sto130dL2(0), sto130dL3(0), sto130dh1bar(0), sto130dh2bar(0), sto130dL1bar(0), sto130dL2bar(0), sto5up(0), sto5down(0), sto10up(0), sto10down(0), sto20up(0), sto20down(0), sto65up(0), sto65down(0), sto130up(0), sto130down(0), sto10up1(0), sto10down1(0), sto20up1(0), sto20down1(0), sto65up1(0), sto65down1(0), sto130up1(0), sto130down1(0), sto10up2(0), sto10down2(0), sto20up2(0), sto20down2(0), sto65up2(0), sto65down2(0), sto130up2(0), sto130down2(0), stok10n20Lcon(0), stok10or20Lcon(0), stok10n20hcon(0), stok10or20hcon(0), stodL10n20Lcon(0), stodL10or20Lcon(0), stodh10n20hcon(0), stodh10or20hcon(0), stodL10n20upcon(0), stodL10or20upcon(0), stodh10n20downcon(0), stodh10or20downcon(0), stok65n130Lcon(0), stok65or130Lcon(0), stok65n130hcon(0), stok65or130hcon(0), stodL65n130Lcon(0), stodL65or130Lcon(0), stodh65n130hcon(0), stodh65or130hcon(0), stodL65n130upcon(0), stodL65or130upcon(0), stodh65n130downcon(0), stodh65or130downcon(0), bapup(0), bapdown(0), upbidaskcon(0), bfupbidaskcon(0), downbidaskcon(0), bfdownbidaskcon(0), borbfupbidaskcon(0), borbfdownbidaskcon(0), dayupbidaskcon(0), daydownbidaskcon(0), sto5h1(0), sto5h2(0), sto5L1(0), sto5L2(0), stok5h1(0), stok5h2(0), stok5h3(0),stok5L1(0), stok5L2(0), stok5L3(0), stod5h1(0), stod5h2(0), stod5h3(0), stod5L1(0), stod5L2(0), stod5L3(0), stok10h1(0), stok10h2(0), stok10h3(0), stok10L1(0), stok10L2(0), stok10L3(0), stod10h1(0), stod10h2(0), stod10h3(0), stod10L1(0), stod10L2(0), stod10L3(0), stok20h1(0), stok20h2(0), stok20h3(0), stok20L1(0), stok20L2(0), stok20L3(0), stod20h1(0), stod20h2(0), stod20h3(0), stod20L1(0), stod20L2(0), stod20L3(0), stok65h1(0), stok65h2(0), stok65h3(0), stok65L1(0), stok65L2(0), stok65L3(0), stod65h1(0), stod65h2(0), stod65h3(0), stod65L1(0), stod65L2(0), stod65L3(0), stok130h1(0), stok130h2(0), stok130h3(0), stok130L1(0), stok130L2(0), stok130L3(0), stod130h1(0), stod130h2(0), stod130h3(0), stod130L1(0), stod130L2(0), stod130L3(0), sto5index(0), sto10index(0), sto20index(0), sto65index(0), sto130index(0), Lstlp1(0), Hstlp1(0), ylstlp1(0), yhstlp1(0), Cnlp1234con (0), spnlp1234con(0), splp01dr(0), splp1234dr(0), lp0123dr(0), lp023dr(0), lp1234dr(0), lp123dr(0), lp124dr(0), lp134dr(0), lp234dr(0), bfsplp01dr(0), bflp0123dr(0), bflp023dr(0), bflp1234dr(0), spdupcon(0), mpdupcon(0), lpdupcon(0), spmpdupcon(0), splpdupcon(0), mplpdupcon(0), spmpnlpdupcon(0), mplpnlp12dupcon(0), splp1dupcon(0), mplp1dupcon(0), lplp1dupcon(0), mplp2dupcon(0), lplp2dupcon(0), lp1dupcon(0), lp2dupcon(0), daylp1L1bar(0), daylp1h1bar(0), uplonglpdr(0), downlonglpdr(0), shorttrend(0), midtrend(0), uplongtrend(0), downlongtrend(0), displp3(0), dayhighlp2(0), daylowlp2(0), dayhighlp3(0), daylowlp3(0), dayhighlp4(0), daylowlp4(0), dayhighdisplp3(0), daylowdisplp3(0), simri(0), dayhighsimri(0), daylowsimri(0), simsumV(0), simcount(0), plusb(0), minusb(0), plusc(0), minusc(0), barcount(0), plusbm(0), minusbm(0), bfdaycloselp(0), dayopenlp(0), daylestlp1(0), dayhestlp1(0), dayopenlp1(0), bfdaylestlp1(0), bfdayhestlp1(0), bfdayopenlp1(0), bap(0), bapL1(0), bapL2(0), baph1(0), baph2(0), uphbbarcon(0), uphb5con(0), uphb10con(0), uphb20con(0), uphbbapcon(0), downhbbarcon(0), downhb5con(0), downhb10con(0), downhb20con(0), downhbbapcon(0), jeong(0), yeog(0), bfjeong(0), bfyeog(0), stoupcon(0), stodowncon(0), notstoupcon(0), notstodowncon(0), buymincon(0), sellmincon(0), buyregcon(0), sellregcon(0), notbuyregcon(0), notsellregcon(0), buybetcon(0), sellbetcon(0), notbuybetcon(0), notsellbetcon(0), tboxmid(0), yboxmid(0), y2boxmid(0), y3boxmid(0), tboxdep(0), yboxdep(0), y2boxdep(0), y3boxdep(0), boxupcnt(0), boxdowncnt(0), boxupbetcnt(0), boxdownbetcnt(0), via(0), contcnt(0), upgapcon(0), downgapcon(0), contgapcnt(0), upgapdaycnt(0), downgapdaycnt(0), upgaplow(0), downgaphigh(0), contupcnt(0), contdowncnt(0), notbuycon(0), notsellcon(0), notbuyclgrd(0), notsellclgrd(0), notbuyclcon(0), notsellclcon(0), forcedbuycon(0), forcedsellcon(0), forcedbuyclcon(0), forcedsellclcon(0), forcedstoupcon(0), forcedstodowncon(0), addbuyclcon(0), addsellclcon(0), addbuyclconcnt(0), addsellclconcnt(0), addbuyclcon99(0), addsellclcon99(0), addbuyclconcnt99(0), addsellclconcnt99(0), dayopenupV(0), dayopendownV(0), dayopenC(0), daybgstupV(0), daybgstdownV(0), bfdaybgstupV(0), bfdaybgstdownV(0), dayupVcnt(0), daydownVcnt(0), dayupVsum(0), daydownVsum(0), dayupVavg(0), daydownVavg(0), dayopenvol(0), daybgstvol(0), bfdayopenvol(0), bfdaybgstvol(0), bgstvolcon(0), bgstupVcon(0), bgstdownVcon(0), savec(0), savesp(0), savelp(0), depvaluemin(0), depvaluemin1(0), depvaluemin3(0), depvaluemid(0), depvaluemid1(0), depvaluemid3(0), depvaluemax(0), d4depvaluemax(0), d2boxdep(0), d2boxhigh(0), d2boxlow(0), d2boxmid(0), d3d2boxdep(0), d3d2boxhigh(0), d3d2boxlow(0), d3d2boxmid(0), d3boxdep(0), d3boxhigh(0), d3boxlow(0), d3boxmid(0), d4boxdep(0), d4boxhigh(0), d4boxlow(0), d4boxmid(0), d5boxdep(0), d5boxhigh(0), d5boxlow(0), d5boxmid(0), d6boxdep(0), d6boxhigh(0), d6boxlow(0), d6boxmid(0), d7boxdep(0), d7boxhigh(0), d7boxlow(0), d7boxmid(0), boxdep(0), boxhigh(0), boxlow(0), boxmid(0), contboxcnt(0), baseboxhigh(0), baseboxlow(0), baseboxmid(0), baseboxdep(0), lp1crupresist(0), lp2crupresist(0), lp3crupresist(0), lp4crupresist(0), lp1crdownresist(0), lp2crdownresist(0), lp3crdownresist(0), lp4crdownresist(0), lp1shupresist(0), lp2shupresist(0), lp3shupresist(0), lp4shupresist(0), lpcrupresist(0), lpshupresist(0), lp1shdownresist(0), lp2shdownresist(0), lp3shdownresist(0), lp4shdownresist(0), lpcrdownresist(0), lpshdownresist(0), lpcrupcon(0), lp1crupcon(0), lp2crupcon(0), lp3crupcon(0), lp4crupcon(0), lpcrdowncon(0), lp1crdowncon(0), lp2crdowncon(0), lp3crdowncon(0), lp4crdowncon(0), d1crupresist(0), d2crupresist(0), d3crupresist(0), d4crupresist(0), d1crdownresist(0), d2crdownresist(0), d3crdownresist(0), d4crdownresist(0), d1shupresist(0), d2shupresist(0), d3shupresist(0), d4shupresist(0), boxcrupresist(0), boxshupresist(0), box7shupresist(0), d1shdownresist(0), d2shdownresist(0), d3shdownresist(0), d4shdownresist(0), boxcrdownresist(0), boxshdownresist(0), box7shdownresist(0), lp1234convercon(0), lp123convercon(0), lp123n4convercon(0), lp123or4convercon(0), boxconvercon(0), d2convercnt(0), d3convercnt(0), d4convercnt(0), lp1234gapmincon(0), lp123gapmincon(0), lp234gapmincon(0), entbartrend(0), clbartrend(0), clbartrend1(0), Crossdown520con(0), upfailure10con(0), displp3con(0), simricon(0), bidaskindex(0), bidaskupcnt(0), bidaskdowncnt(0), daybuyclcon(0), daysellclcon(0), bfdaybuyclcon(0), bfdaysellclcon(0),bfposition(0), bfdayuplpcnt(0), bfdaydownlpcnt(0), bfdayuplp4cnt(0), bfdaydownlp4cnt(0), dayuplpcnt(0), daydownlpcnt(0), dayuplp4cnt(0), daydownlp4cnt(0), count(0), bar12high(0), bar12low(0), bar12dep(0), bar6high(0), bar6low(0), bar6dep(0), bar6highsum(0), bar6lowsum(0), bar6highavg(0), bar6lowavg(0), sellcldownupcon(0), buyclupdowncon(0), contbidaskcnt(0), contbarcnt(0), contvolcnt(0); sp = ma(C, shortPeriod); mp = ma(C, midPeriod); lp = ma(C, longPeriod); lp1 = ma(C, longPeriod1); lp2 = ma(C, longPeriod2); lp3 = ma(C, longPeriod3); lp4 = ma(C, longPeriod4); rp = rsi(rsiperiod); vp = ma(v, volperiod); bidask = ma(bids,3) - ma(asks,3); bap = ma(bidask, 3); sto5k = StochasticsK(sto5Period,sto5Period1); sto5d = StochasticsD(sto5Period,sto5Period1,sto5Period2); sto10k = StochasticsK(sto10Period,sto10Period1); sto10d = StochasticsD(sto10Period,sto10Period1,sto10Period2); sto20k = StochasticsK(sto20Period,sto20Period1); sto20d = StochasticsD(sto20Period,sto20Period1,sto20Period2); sto65k = StochasticsK(sto65Period,sto65Period1); sto65d = StochasticsD(sto65Period,sto65Period1,sto65Period2); sto130k = StochasticsK(sto130Period,sto130Period1); sto130d = StochasticsD(sto130Period,sto130Period1,sto130Period2); bapL1 = Swinglow(1,bap,2,1,50); bapL2 = Swinglow(2,bap,2,1,50); baph1 = Swinghigh(1,bap,2,1,50); baph2 = Swinghigh(2,bap,2,1,50); spL1 = Swinglow(1,sp,2,1,100); spL2 = Swinglow(2,sp,2,1,100); spL3 = Swinglow(3,sp,2,1,100); sph1 = SwingHigh(1,sp,2,1,100); sph2 = SwingHigh(2,sp,2,1,100); sph3 = SwingHigh(3,sp,2,1,100); spL1bar = Swinglowbar(1,sp,2,1,100); spL2bar = Swinglowbar(2,sp,2,1,100); sph1bar = SwingHighbar(1,sp,2,1,100); sph2bar = SwingHighbar(2,sp,2,1,100); mpL1 = Swinglow(1,mp,3,1,100); mpL2 = Swinglow(2,mp,3,1,100); mph1 = SwingHigh(1,mp,3,1,100); mph2 = SwingHigh(2,mp,3,1,100); mpL1bar = Swinglowbar(1,mp,3,1,100); mpL2bar = Swinglowbar(2,mp,3,1,100); mph1bar = SwingHighbar(1,mp,3,1,100); mph2bar = SwingHighbar(2,mp,3,1,100); lpL1 = Swinglow(1,lp,5,1,200); lpL2 = Swinglow(2,lp,5,1,200); lph1 = SwingHigh(1,lp,5,1,200); lph2 = SwingHigh(2,lp,5,1,200); lpL1bar = Swinglowbar(1,lp,5,1,200); lpL2bar = Swinglowbar(2,lp,5,1,200); lph1bar = SwingHighbar(1,lp,5,1,200); lph2bar = SwingHighbar(2,lp,5,1,200); lp1L1 = Swinglow(1,lp1,5,1,600); lp1L2 = Swinglow(2,lp1,5,1,600); lp1h1 = SwingHigh(1,lp1,5,1,600); lp1h2 = SwingHigh(2,lp1,5,1,600); lp1L1bar = Swinglowbar(1,lp1,5,1,600); lp1L2bar = Swinglowbar(2,lp1,5,1,600); lp1h1bar = SwingHighbar(1,lp1,5,1,600); lp1h2bar = SwingHighbar(2,lp1,5,1,600); lp2L1 = Swinglow(1,lp2,5,1,600); lp2L2 = Swinglow(2,lp2,5,1,600); lp2h1 = SwingHigh(1,lp2,5,1,600); lp2h2 = SwingHigh(2,lp2,5,1,600); lp2L1bar = Swinglowbar(1,lp2,5,1,600); lp2L2bar = Swinglowbar(2,lp2,5,1,600); lp2h1bar = SwingHighbar(1,lp2,5,1,600); lp2h2bar = SwingHighbar(2,lp2,5,1,600); displp3 = Disparity(longPeriod3); sto5kh1 = SwingHigh(1,sto5k,3,1,100); sto5kh2 = SwingHigh(2,sto5k,3,1,100); sto5kL1 = Swinglow(1,sto5k,3,1,100); sto5kL2 = Swinglow(2,sto5k,3,1,100); sto10kh1 = SwingHigh(1,sto10k,3,1,100); sto10kh2 = SwingHigh(2,sto10k,3,1,100); sto10kh3 = SwingHigh(3,sto10k,3,1,100); sto10kL1 = Swinglow(1,sto10k,3,1,100); sto10kL2 = Swinglow(2,sto10k,3,1,100); sto10kL3 = Swinglow(3,sto10k,3,1,100); sto10kh1bar = SwingHighbar(1,sto10k,3,1,100); sto10kh2bar = SwingHighbar(2,sto10k,3,1,100); sto10kL1bar = Swinglowbar(1,sto10k,3,1,100); sto10kL2bar = Swinglowbar(2,sto10k,3,1,100); sto20kh1 = SwingHigh(1,sto20k,3,1,100); sto20kh2 = SwingHigh(2,sto20k,3,1,100); sto20kh3 = SwingHigh(3,sto20k,3,1,100); sto20kL1 = Swinglow(1,sto20k,3,1,100); sto20kL2 = Swinglow(2,sto20k,3,1,100); sto20kL3 = Swinglow(3,sto20k,3,1,100); sto20kh1bar = SwingHighbar(1,sto20k,3,1,100); sto20kh2bar = SwingHighbar(2,sto20k,3,1,100); sto20kL1bar = Swinglowbar(1,sto20k,3,1,100); sto20kL2bar = Swinglowbar(2,sto20k,3,1,100); sto65kh1 = SwingHigh(1,sto65k,3,1,300); sto65kh2 = SwingHigh(2,sto65k,3,1,300); sto65kL1 = Swinglow(1,sto65k,3,1,300); sto65kL2 = Swinglow(2,sto65k,3,1,300); sto65kh1bar = SwingHighbar(1,sto65k,3,1,300); sto65kh2bar = SwingHighbar(2,sto65k,3,1,300); sto65kL1bar = Swinglowbar(1,sto65k,3,1,300); sto65kL2bar = Swinglowbar(2,sto65k,3,1,300); sto130kh1 = SwingHigh(1,sto130k,5,1,600); sto130kh2 = SwingHigh(2,sto130k,5,1,600); sto130kL1 = Swinglow(1,sto130k,5,1,600); sto130kL2 = Swinglow(2,sto130k,5,1,600); sto130kh1bar = SwingHighbar(1,sto130k,5,1,600); sto130kh2bar = SwingHighbar(2,sto130k,5,1,600); sto130kL1bar = Swinglowbar(1,sto130k,5,1,600); sto130kL2bar = Swinglowbar(2,sto130k,5,1,600); sto5dh1 = SwingHigh(1,sto5d,3,1,100); sto5dh2 = SwingHigh(2,sto5d,3,1,100); sto5dh3 = SwingHigh(3,sto5d,3,1,100); sto5dL1 = Swinglow(1,sto5d,3,1,100); sto5dL2 = Swinglow(2,sto5d,3,1,100); sto5dL3 = Swinglow(3,sto5d,3,1,100); sto10dh1 = SwingHigh(1,sto10d,5,1,100); sto10dh2 = SwingHigh(2,sto10d,5,1,100); sto10dh3 = SwingHigh(3,sto10d,5,1,100); sto10dL1 = Swinglow(1,sto10d,5,1,100); sto10dL2 = Swinglow(2,sto10d,5,1,100); sto10dL3 = Swinglow(3,sto10d,5,1,100); sto10dh1bar = SwingHighbar(1,sto10d,5,1,100); sto10dh2bar = SwingHighbar(2,sto10d,5,1,100); sto10dL1bar = Swinglowbar(1,sto10d,5,1,100); sto10dL2bar = Swinglowbar(2,sto10d,5,1,100); sto20dh1 = SwingHigh(1,sto20d,5,1,200); sto20dh2 = SwingHigh(2,sto20d,5,1,200); sto20dh3 = SwingHigh(3,sto20d,5,1,200); sto20dL1 = Swinglow(1,sto20d,5,1,200); sto20dL2 = Swinglow(2,sto20d,5,1,200); sto20dL3 = Swinglow(3,sto20d,5,1,200); sto20dh1bar = SwingHighbar(1,sto20d,5,1,200); sto20dh2bar = SwingHighbar(2,sto20d,5,1,200); sto20dL1bar = Swinglowbar(1,sto20d,5,1,200); sto20dL2bar = Swinglowbar(2,sto20d,5,1,200); sto65dh1 = SwingHigh(1,sto65d,10,1,600); sto65dh2 = SwingHigh(2,sto65d,10,1,600); sto65dL1 = Swinglow(1,sto65d,10,1,600); sto65dL2 = Swinglow(2,sto65d,10,1,600); sto65dh1bar = SwingHighbar(1,sto65d,10,1,600);// sto65dh2bar = SwingHighbar(2,sto65d,10,1,600);// sto65dL1bar = Swinglowbar(1,sto65d,10,1,600);// sto65dL2bar = Swinglowbar(2,sto65d,10,1,600);// sto130dh1 = SwingHigh(1,sto130d,10,1,600); sto130dh2 = SwingHigh(2,sto130d,10,1,600); sto130dL1 = Swinglow(1,sto130d,10,1,600); sto130dL2 = Swinglow(2,sto130d,10,1,600); sto130dh1bar = SwingHighbar(1,sto130d,10,1,600); sto130dh2bar = SwingHighbar(2,sto130d,10,1,600); sto130dL1bar = Swinglowbar(1,sto130d,10,1,600); sto130dL2bar = Swinglowbar(2,sto130d,10,1,600); // ---------- ¿øÇÏ´Â Æ÷Áö¼Ç ¼ö·® Á¶Á¤¹× û»ê¿¡ µû¸¥ º¸Á¶ ·çƾ ---------- // { if marketposition() == 0 then// ÀÜ°í°¡ ¾ø´Â °æ¿ì {via = 0; contcnt = 0; Bcontby2 = Fcontby2; Bcontreg = Fcontreg; Bcont5min = Fcont5min; Scontby2 = Fcontby2; Scontreg = Fcontreg; Scont5min = Fcont5min;} else if marketposition() == 1 then// ¸Å¼ö ÀÜ°í°¡ ÀÖ´Â °æ¿ì {Bcontby2 = Fcontby2 - Currentcontracts();// ¸Å¼ö Èñ¸ÁÀÜ°í¿¡¼­ ±âÁ¸ ÀÜ°í¸¦ Â÷°¨ÈÄ ÁÖ¹® Bcontreg = Fcontreg - Currentcontracts();// ¸Å¼ö Èñ¸ÁÀÜ°í¿¡¼­ ±âÁ¸ ÀÜ°í¸¦ Â÷°¨ÈÄ ÁÖ¹® Bcont5min = Fcont5min - Currentcontracts();// ¸Å¼ö Èñ¸ÁÀÜ°í¿¡¼­ ±âÁ¸ ÀÜ°í¸¦ Â÷°¨ÈÄ ÁÖ¹® Scontby2 = Fcontby2; Scontreg = Fcontreg; Scont5min = Fcont5min;}// ¸Åµµ½Ã¿¡´Â Èñ¸ÁÀܰíºÎ¿© else if marketposition() == -1 then// ¸Åµµ ÀÜ°í°¡ ÀÖ´Â °æ¿ì {Scontby2 = Fcontby2 - Currentcontracts();// ¸Åµµ Èñ¸ÁÀÜ°í¿¡¼­ ±âÁ¸ ÀÜ°í¸¦ Â÷°¨ÈÄ ÁÖ¹® Scontreg = Fcontreg - Currentcontracts();// ¸Åµµ Èñ¸ÁÀÜ°í¿¡¼­ ±âÁ¸ ÀÜ°í¸¦ Â÷°¨ÈÄ ÁÖ¹® Scont5min = Fcont5min - Currentcontracts();// ¸Åµµ Èñ¸ÁÀÜ°í¿¡¼­ ±âÁ¸ ÀÜ°í¸¦ Â÷°¨ÈÄ ÁÖ¹® Bcontby2 = Fcontby2; Bcontreg = Fcontreg; Bcont5min = Fcont5min;}// ¸Å¼ö½Ã¿¡´Â Èñ¸ÁÀܰíºÎ¿© } // ---------- ÀÏÁßû»ê ¿©ºÎ ÆÇ´Ü ·çƾ ---------- // if dayindex() == 0 then {bfdaybuyclcon = daybuyclcon; bfdaysellclcon = daysellclcon;} { if dayindex() == 0 then {bfposition = marketposition(); daybuyclcon = 0; daysellclcon = 0;} if bfposition == 0 and marketposition() <> 0 then {bfposition = marketposition();} if bfposition == 1 and marketposition() < 1 then {daybuyclcon = 1;} if bfposition == -1 and marketposition() > -1 then {daysellclcon = 1;} } // ---------- ºÀÀÇ Å©±â »êÃâ(½Ã°¡¿Í Á¾°¡¿Í Â÷ÀÌ) ---------- // {upV = 0; upV1 = 0; upV2 = 0; downV = 0; downV1 = 0; downV2 = 0;} {tupV = 0; tupV1 = 0; tupV2 = 0; tdownV = 0; tdownV1 = 0; tdownV2 = 0;} {downupV = 0; downupV1 = 0; downupV2 = 0; updownV = 0; updownV1 = 0; updownV2 = 0;} if C >= O then {upV = C - O; updownV = H - C; downupV = O - L; } if C[1] >= O[1] then {upV1 = C[1] - O[1]; updownV1 = H[1] - C[1]; downupV1 = O[1] - L[1];} if C[2] >= O[2] then {upV2 = C[2] - O[2]; updownV2 = H[2] - C[2]; downupV2 = O[2] - L[2];} if C <= O then {downV = O - C; downupV = C - L; updownV = H - O;} if C[1] <= O[1] then {downV1 = O[1] - C[1]; downupV1 = C[1] - L[1]; updownV1 = H[1] - O[1];} if C[2] <= O[2] then {downV2 = O[2] - C[2]; downupV2 = C[2] - L[2]; updownV2 = H[2] - O[2];} {tupV = C - L; tupV1 = C[1] - L[1]; tupV2 = C[2] - L[2];} {tdownV = H - C; tdownV1 = H[1] - C[1]; tdownV2 = H[2] - C[2];} // ---------- ¹Ú½º±Ç»ó´Ü, ¹Ú½º±ÇÇÏ´Ü¹× ¹Ú½º±Ç Áß°£°ª, ¹Ú½º±Ç Å©±â »êÃâ ·çÆ¾ ---------- // { depvaluemin = 0; depvaluemin1 = 0; depvaluemin3 = 0; depvaluemid = 0; depvaluemid1 = 0; depvaluemid3 = 0; depvaluemax = 0; d4depvaluemax = 0; tboxmid = 0; yboxmid = 0; y2boxmid = 0; y3boxmid = 0; // ±ÝÀÏ ¶Ç´Â ÀüÀÏÀÇ ÃÖ°í°¡¿Í ÃÖÀú°¡ÀÇ Áß°£°ª tboxdep = 0; yboxdep = 0; y2boxdep = 0; y3boxdep = 0; d2boxdep = 0; d2boxhigh = 0; d2boxlow = 0; d2boxmid = 0; d3d2boxdep = 0; d3d2boxhigh = 0; d3d2boxlow = 0; d3d2boxmid = 0; d3boxdep = 0; d3boxhigh = 0; d3boxlow = 0; d3boxmid = 0; d4boxdep = 0; d4boxhigh = 0; d4boxlow = 0; d4boxmid = 0; d5boxdep = 0; d5boxhigh = 0; d5boxlow = 0; d5boxmid = 0; d6boxdep = 0; d6boxhigh = 0; d6boxlow = 0; d6boxmid = 0; d7boxdep = 0; d7boxhigh = 0; d7boxlow = 0; d7boxmid = 0; boxupcnt = 0; boxupbetcnt = 0;// ?Àϰ£ÀÇ ¹Ú½º±ÇÀ» »óÇâ Å»Ãâ½Ã boxdowncnt = 0; boxdownbetcnt = 0; // ?Àϰ£ÀÇ ¹Ú½º±ÇÀ» ÇÏÇâ Å»Ãâ½Ã //Fdepratemin(0.006), Fdepratemin1(0.01), Fdepratemin3(0.015), //Fdepratemid(0.02), Fdepratemid1(0.025), Fdepratemid3(0.03), Fdepratemax(0.05) depvaluemin = dayclose(1) * Fdepratemin; depvaluemin3 = dayclose(1) * Fdepratemin3; depvaluemin1 = dayclose(1) * Fdepratemin1; depvaluemid1 = dayclose(1) * Fdepratemid1; depvaluemid = dayclose(1) * Fdepratemid; depvaluemid3 = dayclose(1) * Fdepratemid3; depvaluemax = dayclose(1) * Fdepratemax; tboxmid = (dayhigh(0) + daylow(0)) / 2; yboxmid = (dayhigh(1) + daylow(1)) / 2; y2boxmid = (dayhigh(2) + daylow(2)) / 2; y3boxmid = (dayhigh(3) + daylow(3)) / 2; tboxdep = dayhigh(0) - daylow(0); yboxdep = dayhigh(1) - daylow(1); y2boxdep = dayhigh(2) - daylow(2); y3boxdep = dayhigh(3) - daylow(3); } {// 3ÀÏÀü°ú 2ÀÏÀÏÀÇ ÃÖ°í°¡¿Í ÃÖÀú°¡¸¦ ºñ±³ÇÏ¿© ¹Ú½º±ÇÀÇ Æø¹× ±× Áß°£°ªÀ» ±¸ÇÔ { if dayhigh(3) > dayhigh(2) then {d3d2boxhigh = dayhigh(3);} if dayhigh(3) <= dayhigh(2) then {d3d2boxhigh = dayhigh(2);} if daylow(3) < daylow(2) then {d3d2boxlow = daylow(3);} if daylow(3) >= daylow(2) then {d3d2boxlow = daylow(2);} } {d3d2boxdep = d3d2boxhigh - d3d2boxlow; d3d2boxmid = (d3d2boxhigh + d3d2boxlow) / 2;} } {// ÀüÀüÀϰú ÀüÀÏÀÇ ÃÖ°í°¡¿Í ÃÖÀú°¡¸¦ »êÃâÇÏ¿© °ú°Å 2Àϰ£ÀÇ ¹Ú½º±ÇÀÇ Æø¹× ±× Áß°£°ªÀ» ±¸ÇÔ { if dayhigh(2) > dayhigh(1) then {d2boxhigh = dayhigh(2);} if dayhigh(2) <= dayhigh(1) then {d2boxhigh = dayhigh(1);} if daylow(2) < daylow(1) then {d2boxlow = daylow(2);} if daylow(2) >= daylow(1) then {d2boxlow = daylow(1);} } {d2boxdep = d2boxhigh - d2boxlow; d2boxmid = (d2boxhigh + d2boxlow) / 2;} } {// ±ÝÀÏ ÀÌÀü °ú°Å 3Àϰ£ÀÇ ÃÖ°í°¡¹× ÃÖÀú°¡¸¦ ±¸ÇÔ { if dayhigh(3) > d2boxhigh then {d3boxhigh = dayhigh(3);} if dayhigh(3) <= d2boxhigh then {d3boxhigh = d2boxhigh;} if daylow(3) < d2boxlow then {d3boxlow = daylow(3);} if daylow(3) >= d2boxlow then {d3boxlow = d2boxlow;} } {d3boxdep = d3boxhigh - d3boxlow; d3boxmid = (d3boxhigh + d3boxlow) / 2;} } {// ±ÝÀÏ ÀÌÀü °ú°Å 4Àϰ£ÀÇ ÃÖ°í°¡¹× ÃÖÀú°¡¸¦ ±¸ÇÔ { if dayhigh(4) > d3boxhigh then {d4boxhigh = dayhigh(4);} if dayhigh(4) <= d3boxhigh then {d4boxhigh = d3boxhigh;} if daylow(4) < d3boxlow then {d4boxlow = daylow(4);} if daylow(4) >= d3boxlow then {d4boxlow = d3boxlow;} } {d4boxdep = d4boxhigh - d4boxlow; d4boxmid = (d4boxhigh + d4boxlow) / 2;} } {// ±ÝÀÏ ÀÌÀü °ú°Å 5Àϰ£ÀÇ ÃÖ°í°¡¹× ÃÖÀú°¡¸¦ ±¸ÇÔ { if dayhigh(5) > d4boxhigh then {d5boxhigh = dayhigh(5);} if dayhigh(5) <= d4boxhigh then {d5boxhigh = d4boxhigh;} if daylow(5) < d4boxlow then {d5boxlow = daylow(5);} if daylow(5) >= d4boxlow then {d5boxlow = d4boxlow;} } {d5boxdep = d5boxhigh - d5boxlow; d5boxmid = (d5boxhigh + d5boxlow) / 2;} } {// ±ÝÀÏ ÀÌÀü °ú°Å 6Àϰ£ÀÇ ÃÖ°í°¡¹× ÃÖÀú°¡¸¦ ±¸ÇÔ { if dayhigh(6) > d5boxhigh then {d6boxhigh = dayhigh(6);} if dayhigh(6) <= d5boxhigh then {d6boxhigh = d5boxhigh;} if daylow(6) < d5boxlow then {d6boxlow = daylow(6);} if daylow(6) >= d5boxlow then {d6boxlow = d5boxlow;} } {d6boxdep = d6boxhigh - d6boxlow; d6boxmid = (d6boxhigh + d6boxlow) / 2;} } {// ±ÝÀÏ ÀÌÀü °ú°Å 7Àϰ£ÀÇ ÃÖ°í°¡¹× ÃÖÀú°¡¸¦ ±¸ÇÔ { if dayhigh(7) > d6boxhigh then {d7boxhigh = dayhigh(7);} if dayhigh(7) <= d6boxhigh then {d7boxhigh = d6boxhigh;} if daylow(7) < d6boxlow then {d7boxlow = daylow(7);} if daylow(7) >= d6boxlow then {d7boxlow = d6boxlow;} } {d7boxdep = d7boxhigh - d7boxlow; d7boxmid = (d7boxhigh + d7boxlow) / 2;} } // ---------- ½ºÅä ½Ö¹Ù´Ú¹× ½ÖºÀ¿©ºÎ ÆÇ´Ü ---------- // { sto5up = 0; sto5down = 0; sto10up = 0; sto10down = 0; sto20up = 0; sto20down = 0; sto65up = 0; sto65down = 0; sto130up = 0; sto130down = 0; sto10up1 = 0; sto10down1 = 0; sto20up1 = 0; sto20down1 = 0; sto65up1 = 0; sto65down1 = 0; sto130up1 = 0; sto130down1 = 0; sto10up2 = 0; sto10down2 = 0; sto20up2 = 0; sto20down2 = 0; sto65up2 = 0; sto65down2 = 0; sto130up2 = 0; sto130down2 = 0; } if Crossup(sto5k,sto5d) then { sto5L2 = sto5L1; sto5L1 = sto5k[1];} if Crossdown(sto5k,sto5d) then { sto5h2 = sto5h1; sto5h1 = sto5k[1];} if Crossup(sto10k,sto10d) then {stok10L3 = stok10L2; stok10L2 = stok10L1; stok10L1 = sto10k[1]; stod10L3 = stod10L2; stod10L2 = stod10L1; stod10L1 = sto10d[1]; sto10index = index;} if Crossdown(sto10k,sto10d) then {stok10h3 = stok10h2; stok10h2 = stok10h1; stok10h1 = sto10k[1]; stod10h3 = stod10h2; stod10h2 = stod10h1; stod10h1 = sto10d[1]; sto10index = index;} if Crossup(sto20k,sto20d) then {stok20L3 = stok20L2; stok20L2 = stok20L1; stok20L1 = sto20k[1]; stod20L3 = stod20L2; stod20L2 = stod20L1; stod20L1 = sto20d[1]; sto20index = index;} if Crossdown(sto20k,sto20d) then {stok20h3 = stok20h2; stok20h2 = stok20h1; stok20h1 = sto20k[1]; stod20h3 = stod20h2; stod20h2 = stod20h1; stod20h1 = sto20d[1]; sto20index = index;} if Crossup(sto65k,sto65d) then {stok65L3 = stok65L2; stok65L2 = stok65L1; stok65L1 = sto65k[1]; stod65L3 = stod65L2; stod65L2 = stod65L1; stod65L1 = sto65d[1]; sto65index = index;} if Crossdown(sto65k,sto65d) then {stok65h3 = stok65h2; stok65h2 = stok65h1; stok65h1 = sto65k[1]; stod65h3 = stod65h2; stod65h2 = stod65h1; stod65h1 = sto65d[1]; sto65index = index;} if Crossup(sto130k,sto130d) then {stok130L3 = stok130L2; stok130L2 = stok130L1; stok130L1 = sto130k[1]; stod130L3 = stod130L2; stod130L2 = stod130L1; stod130L1 = sto130d[1]; sto130index = index;} if Crossdown(sto130k,sto130d) then {stok130h3 = stok130h2; stok130h2 = stok130h1; stok130h1 = sto130k[1]; stod130h3 = stod130h2; stod130h2 = stod130h1; stod130h1 = sto130d[1]; sto130index = index;} // ½ºÅä½ÖºÀ, ½Ö¹Ù´Ú Á¶°Ç ¸¸Á·½Ã ºÀ °æ°ú Á¦ÇÑÇÔ if sto5k + 1 < sto5d and sto5k < sto5k[1] and sto5index + 5 >= index then { if sto5dh1 < sto5dh2 then { if sto5dh2 < sto5dh3 then {sto5down = 3;}// ½ºÅä10ÀÌ ¾²¸®ºÀÀÎ °æ¿ì else {sto5down = 2;}// ½ºÅä10ÀÌ ½ÖºÀÀÎ °æ¿ì } else if stok5h1 < stok5h2 and stod5h1 + 3 < stod5h2 then {sto5down = 2;} } if sto5k > sto5d + 1 and sto5k > sto5k[1] and sto5index + 5 >= index then { if sto5dL1 > sto5dL2 then { if sto5dL2 > sto5dL3 then {sto5up = 3;}// ½ºÅä10ÀÌ ¾²¸®¹Ù´ÚÀÎ °æ¿ì else {sto5up = 2;}// ½ºÅä10ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì } else if stok5L1 > stok5L2 and stod5L1 > stod5L2 + 2 then {sto5up = 2;} } if sto10k + 1 < sto10d and sto10k < sto10k[1] and sto10index + 5 >= index then { if sto10dh1 < sto10dh2 then { if sto10dh2 < sto10dh3 then {sto10down = 3;}// ½ºÅä10ÀÌ ¾²¸®ºÀÀÎ °æ¿ì else {sto10down = 2;}// ½ºÅä10ÀÌ ½ÖºÀÀÎ °æ¿ì } else if sto10dh2bar - sto10dh1bar < 8 then { if sto10dh1 < sto10dh3 then {sto10down = 2;} } else if stok10h1 < stok10h2 and stod10h1 + 3 < stod10h2 then {sto10down = 2;} else if sto10kh1 < sto10kh2 and sto10kh1 < sto10d[sto10kh1bar] and sto10kh1bar < 5 and sto10k < stoh then {sto10down = 2;} } if sto10k > sto10d + 1 and sto10k > sto10k[1] and sto10index + 5 >= index then { if sto10dL1 > sto10dL2 then { if sto10dL2 > sto10dL3 then {sto10up = 3;}// ½ºÅä10ÀÌ ¾²¸®¹Ù´ÚÀÎ °æ¿ì else {sto10up = 2;}// ½ºÅä10ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì } else if sto10dL2bar - sto10dL1bar < 8 then { if sto10dL1 > sto10dL3 then {sto10up = 2;} } else if stok10L1 > stok10L2 and stod10L1 > stod10L2 + 2 then {sto10up = 2;} else if sto10kL1 > sto10kL2 and sto10kL1 > sto10d[sto10kL1bar] and sto10kL1bar < 5 then {sto10up = 2;} } if sto20k + 1 < sto20d and sto20k < sto20k[1] and sto20index + 10 >= index then { if sto20dh1 < sto20dh2 then { if sto20dh2 < sto20dh3 then {sto20down = 3;}// ½ºÅä20ÀÌ ¾²¸®ºÀÀÎ °æ¿ì else {sto20down = 2;}// ½ºÅä20ÀÌ ½ÖºÀÀÎ °æ¿ì } else if sto20dh2bar - sto20dh1bar < 8 then { if sto20dh1 < sto20dh3 then {sto20down = 2;} } else if stok20h1 < stok20h2 and stod20h1 + 3 < stod20h2 then {sto20down = 2;} else if sto20kh1 < sto20kh2 and sto20kh1 < sto20d[sto20kh1bar] and sto20kh1bar < 5 and sto20k < stoh then {sto20down = 2;} } if sto20k > sto20d + 1 and sto20k > sto20k[1] and sto20index + 10 >= index then { if sto20dL1 > sto20dL2 then { if sto20dL2 > sto20dL3 then {sto20up = 3;}// ½ºÅä20ÀÌ ¾²¸®¹Ù´ÚÀÎ °æ¿ì else {sto20up = 2;}// ½ºÅä20ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì } else if sto20dL2bar - sto20dL1bar < 8 then { if sto20dL1 > sto20dL3 then {sto20up = 2;} } else if stok20L1 > stok20L2 and stod20L1 > stod20L2 + 2 then {sto20up = 2;} else if sto20kL1 > sto20kL2 and sto20kL1 > sto20d[sto20kL1bar] and sto20kL1bar < 5 then {sto20up = 2;} } if (sto65dh1 + 3 < sto65dh2 or (sto65dh1 < sto65dh2 and sto65dh1 < stoh) or sto65kh1 + 5 < sto65kh2 ) and sto65k < sto65d and sto65k < sto65k[1] and sto65index + 24 >= index then {sto65down = 2;}// ½ºÅä65ÀÌ ½ÖºÀÀÎ °æ¿ì if (sto65dL1 > sto65dL2 + 3 or (sto65dL1 > sto65dL2 and sto65dL1 > stoL) or sto65kL1 > sto65kL2 + 5 ) and sto65k > sto65d and sto65k > sto65k[1] and sto65index + 24 >= index then {sto65up = 2;}// ½ºÅä65ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì if (sto130dh1 + 3 < sto130dh2 or (sto130dh1 < sto130dh2 and sto130dh1 < stoh) or sto130kh1 + 5 < sto130kh2 ) and sto130k < sto130d and sto130k < sto130k[1] and sto130index + 24 >= index then {sto130down = 2;}// ½ºÅä130ÀÌ ½ÖºÀÀÎ °æ¿ì if (sto130dL1 > sto130dL2 + 3 or (sto130dL1 > sto130dL2 and sto130dL1 > stoL) or sto130kL1 > sto130kL2 + 5 ) and sto130k > sto130d and sto130k > sto130k[1] and sto130index + 24 >= index then {sto130up = 2;}// ½ºÅä130ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì // ½ºÅä½ÖºÀ, ½Ö¹Ù´Ú Á¶°Ç ¸¸Á·½Ã ºÀ °æ°ú Á¦ÇÑ ¾øÀ½. ´Ü, stokÀÇ ¹æÇâÀº È®ÀÎ if sto10k + 1 < sto10d and sto10k < sto10k[1] then { if sto10dh1 < sto10dh2 then { if sto10dh2 < sto10dh3 then {sto10down1 = 3;}// ½ºÅä10ÀÌ ¾²¸®ºÀÀÎ °æ¿ì else {sto10down1 = 2;}// ½ºÅä10ÀÌ ½ÖºÀÀÎ °æ¿ì } else if stok10h1 < stok10h2 and stod10h1 + 3 < stod10h2 then {sto10down1 = 2;} else if sto10kh1 < sto10kh2 and sto10kh1 < sto10d[sto10kh1bar] and sto10k < stoh then {sto10down1 = 2;} } if sto10k > sto10d + 1 and sto10k > sto10k[1] then { if sto10dL1 > sto10dL2 then { if sto10dL2 > sto10dL3 then {sto10up1 = 3;}// ½ºÅä10ÀÌ ¾²¸®¹Ù´ÚÀÎ °æ¿ì else {sto10up1 = 2;}// ½ºÅä10ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì } else if stok10L1 > stok10L2 and stod10L1 > stod10L2 + 2 then {sto10up1 = 2;} else if sto10kL1 > sto10kL2 and sto10kL1 > sto10d[sto10kL1bar] then {sto10up1 = 2;} } if sto20k + 1 < sto20d and sto20k < sto20k[1] then { if sto20dh1 < sto20dh2 then { if sto20dh2 < sto20dh3 then {sto20down1 = 3;}// ½ºÅä20ÀÌ ¾²¸®ºÀÀÎ °æ¿ì else {sto20down1 = 2;}// ½ºÅä20ÀÌ ½ÖºÀÀÎ °æ¿ì } else if stok20h1 < stok20h2 and stod20h1 + 3 < stod20h2 then {sto20down1 = 2;} else if sto20kh1 < sto20kh2 and sto20kh1 < sto20d[sto20kh1bar] and sto20k < stoh then {sto20down1 = 2;} } if sto20k > sto20d + 1 and sto20k > sto20k[1] then { if sto20dL1 > sto20dL2 then { if sto20dL2 > sto20dL3 then {sto20up1 = 3;}// ½ºÅä20ÀÌ ¾²¸®¹Ù´ÚÀÎ °æ¿ì else {sto20up1 = 2;}// ½ºÅä20ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì } else if stok20L1 > stok20L2 and stod20L1 > stod20L2 + 2 then {sto20up1 = 2;} else if sto20kL1 > sto20kL2 and sto20kL1 > sto20d[sto20kL1bar] then {sto20up1 = 2;} } if (sto65dh1 + 3 < sto65dh2 or (sto65dh1 < sto65dh2 and sto65dh1 < stoh) or sto65kh1 + 5 < sto65kh2 ) and sto65k < sto65d and sto65k < sto65k[1] then {sto65down1 = 2;}// ½ºÅä65ÀÌ ½ÖºÀÀÎ °æ¿ì if (sto65dL1 > sto65dL2 + 3 or (sto65dL1 > sto65dL2 and sto65dL1 > stoL) or sto65kL1 > sto65kL2 + 5 ) and sto65k > sto65d and sto65k > sto65k[1] then {sto65up1 = 2;}// ½ºÅä65ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì if (sto130dh1 + 3 < sto130dh2 or (sto130dh1 < sto130dh2 and sto130dh1 < stoh) or sto130kh1 + 5 < sto130kh2 ) and sto130k < sto130d and sto130k < sto130k[1] then {sto130down1 = 2;}// ½ºÅä130ÀÌ ½ÖºÀÀÎ °æ¿ì if (sto130dL1 > sto130dL2 + 3 or (sto130dL1 > sto130dL2 and sto130dL1 > stoL) or sto130kL1 > sto130kL2 + 5 ) and sto130k > sto130d and sto130k > sto130k[1] then {sto130up1 = 2;}// ½ºÅä130ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì // ½ºÅä½ÖºÀ, ½Ö¹Ù´Ú Á¶°Ç ¸¸Á·½Ã ºÀ °æ°ú Á¦ÇÑ ¾øÀ½. ´Ü, stodÀÇ ¹æÇâÀº È®ÀÎ if sto10k + 1 < sto10d and sto10d < sto10d[1] then { if sto10dh1 < sto10dh2 then { if sto10dh2 < sto10dh3 then {sto10down2 = 3;}// ½ºÅä10ÀÌ ¾²¸®ºÀÀÎ °æ¿ì else {sto10down2 = 2;}// ½ºÅä10ÀÌ ½ÖºÀÀÎ °æ¿ì } else if stok10h1 < stok10h2 and stod10h1 + 3 < stod10h2 then {sto10down2 = 2;} else if sto10kh1 < sto10kh2 and sto10kh1 < sto10d[sto10kh1bar] and sto10k < stoh then {sto10down2 = 2;} } if sto10k > sto10d + 1 and sto10d > sto10d[1] then { if sto10dL1 > sto10dL2 then { if sto10dL2 > sto10dL3 then {sto10up2 = 3;}// ½ºÅä10ÀÌ ¾²¸®¹Ù´ÚÀÎ °æ¿ì else {sto10up2 = 2;}// ½ºÅä10ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì } else if stok10L1 > stok10L2 and stod10L1 > stod10L2 + 2 then {sto10up2 = 2;} else if sto10kL1 > sto10kL2 and sto10kL1 > sto10d[sto10kL1bar] then {sto10up2 = 2;} } if sto20k + 1 < sto20d and sto20d < sto20d[1] then { if sto20dh1 < sto20dh2 then { if sto20dh2 < sto20dh3 then {sto20down2 = 3;}// ½ºÅä20ÀÌ ¾²¸®ºÀÀÎ °æ¿ì else {sto20down2 = 2;}// ½ºÅä20ÀÌ ½ÖºÀÀÎ °æ¿ì } else if stok20h1 < stok20h2 and stod20h1 + 3 < stod20h2 then {sto20down2 = 2;} else if sto20kh1 < sto20kh2 and sto20kh1 < sto20d[sto20kh1bar] and sto20k < stoh then {sto20down2 = 2;} } if sto20k > sto20d + 1 and sto20d > sto20d[1] then { if sto20dL1 > sto20dL2 then { if sto20dL2 > sto20dL3 then {sto20up2 = 3;}// ½ºÅä20ÀÌ ¾²¸®¹Ù´ÚÀÎ °æ¿ì else {sto20up2 = 2;}// ½ºÅä20ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì } else if stok20L1 > stok20L2 and stod20L1 > stod20L2 + 2 then {sto20up2 = 2;} else if sto20kL1 > sto20kL2 and sto20kL1 > sto20d[sto20kL1bar] then {sto20up2 = 2;} } if (sto65dh1 + 3 < sto65dh2 or (sto65dh1 < sto65dh2 and sto65dh1 < stoh) or sto65kh1 + 5 < sto65kh2 ) and sto65k < sto65d and sto65d < sto65d[1] then {sto65down2 = 2;}// ½ºÅä65ÀÌ ½ÖºÀÀÎ °æ¿ì if (sto65dL1 > sto65dL2 + 3 or (sto65dL1 > sto65dL2 and sto65dL1 > stoL) or sto65kL1 > sto65kL2 + 5 ) and sto65k > sto65d and sto65d > sto65d[1] then {sto65up2 = 2;}// ½ºÅä65ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì if (sto130dh1 + 3 < sto130dh2 or (sto130dh1 < sto130dh2 and sto130dh1 < stoh) or sto130kh1 + 5 < sto130kh2 ) and sto130k < sto130d and sto130d < sto130d[1] then {sto130down2 = 2;}// ½ºÅä130ÀÌ ½ÖºÀÀÎ °æ¿ì if (sto130dL1 > sto130dL2 + 3 or (sto130dL1 > sto130dL2 and sto130dL1 > stoL) or sto130kL1 > sto130kL2 + 5 ) and sto130k > sto130d and sto130d > sto130d[1] then {sto130up2 = 2;}// ½ºÅä130ÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì // ---------- ½ºÅä10, 20ÀÇ °ú³Ã, °ú¿­ ¿©ºÎ ÆÇ´Ü ---------- // {stok10n20Lcon = 0; stok10or20Lcon = 0; stok10n20hcon = 0; stok10or20hcon = 0; stodL10n20Lcon = 0; stodL10or20Lcon = 0; stodh10n20hcon = 0; stodh10or20hcon = 0; stodL10n20upcon = 0; stodL10or20upcon = 0; stodh10n20downcon = 0; stodh10or20downcon = 0;} { if (sto20k[1] < stoL or sto20k < stoL) and (sto10k[1] < stoL or sto10k < stoL) then {stok10n20Lcon = 1;} if (sto20k[1] < stoL or sto10k[1] < stoL) or (sto20k < stoL or sto10k < stoL) then {stok10or20Lcon = 1;} if (sto20k[1] > stoh or sto20k > stoh) and (sto10k[1] > stoh or sto10k > stoh) then {stok10n20hcon = 1;} if (sto20k[1] > stoh or sto10k[1] > stoh) or (sto20k > stoh or sto10k > stoh) then {stok10or20hcon = 1;} if (sto10k < sto10dh1 and sto10d < sto10dh1 and sto10dh1 > stoh and (sto10dh1bar > 5 or (sto10dh1bar > 3 and sto10k < stoh))) and (sto20d < sto20dh1 and sto20dh1 > stoh and (sto20dh1bar > 5 or (sto20dh1bar > 3 and sto20k < stoh))) then {stodh10n20hcon = 1;} if (sto10k > sto10dL1 and sto10d > sto10dL1 and sto10dL1 < stoL and (sto10dL1bar > 5 or (sto10dL1bar > 3 and sto10k > stoL))) and (sto20d > sto20dL1 and sto20dL1 < stoL and (sto20dL1bar > 5 or (sto20dL1bar > 3 and sto20k > stoL))) then {stodL10n20Lcon = 1;} if (sto10k < sto10dh1 and sto10d < sto10dh1 and sto10dh1 > stoh and (sto10dh1bar > 5 or (sto10dh1bar > 3 and sto10k < stoh))) or (sto20d < sto20dh1 and sto20dh1 > stoh and (sto20dh1bar > 5 or (sto20dh1bar > 3 and sto20k < stoh))) then {stodh10or20hcon = 1;} if (sto10k > sto10dL1 and sto10d > sto10dL1 and sto10dL1 < stoL and (sto10dL1bar > 5 or (sto10dL1bar > 3 and sto10k > stoL))) or (sto20d > sto20dL1 and sto20dL1 < stoL and (sto20dL1bar > 5 or (sto20dL1bar > 3 and sto20k > stoL))) then {stodL10or20Lcon = 1;} if (sto10k < sto10dh1 and sto10d < sto10dh1 and (sto10dh1bar > 5 or (sto10dh1bar > 3 and sto10k < stoh))) and (sto20d < sto20dh1 and (sto20dh1bar > 5 or (sto20dh1bar > 3 and sto20k < stoh))) then {stodh10n20downcon = 1;} if (sto10k > sto10dL1 and sto10d > sto10dL1 and (sto10dL1bar > 5 or (sto10dL1bar > 3 and sto10k > stoL))) and (sto20d > sto20dL1 and (sto20dL1bar > 5 or (sto20dL1bar > 3 and sto20k > stoL))) then {stodL10n20upcon = 1;} if (sto10k < sto10dh1 and sto10d < sto10dh1 and (sto10dh1bar > 5 or (sto10dh1bar > 3 and sto10k < stoh))) or (sto20d < sto20dh1 and (sto20dh1bar > 5 or (sto20dh1bar > 3 and sto20k < stoh))) then {stodh10or20downcon = 1;} if (sto10k > sto10dL1 and sto10d > sto10dL1 and (sto10dL1bar > 5 or (sto10dL1bar > 3 and sto10k > stoL))) or (sto20d > sto20dL1 and (sto20dL1bar > 5 or (sto20dL1bar > 3 and sto20k > stoL))) then {stodL10or20upcon = 1;} } // ---------- ½ºÅä65, 130ÀÇ °ú³Ã, °ú¿­ ¿©ºÎ ÆÇ´Ü ---------- // {stok65n130Lcon = 0; stok65or130Lcon = 0; stok65n130hcon = 0; stok65or130hcon = 0; stodL65n130Lcon = 0; stodL65or130Lcon = 0; stodh65n130hcon = 0; stodh65or130hcon = 0; stodL65n130upcon = 0; stodL65or130upcon = 0; stodh65n130downcon = 0; stodh65or130downcon = 0;} { if (sto130k[1] < stoL or sto130k < stoL) and (sto65k[1] < stoL or sto65k < stoL) then {stok65n130Lcon = 1;} if (sto130k[1] < stoL or sto65k[1] < stoL) or (sto130k < stoL or sto65k < stoL) then {stok65or130Lcon = 1;} if (sto130k[1] > stoh or sto130k > stoh) and (sto65k[1] > stoh or sto65k > stoh) then {stok65n130hcon = 1;} if (sto130k[1] > stoh or sto65k[1] > stoh) or (sto130k > stoh or sto65k > stoh) then {stok65or130hcon = 1;} if (sto65k < sto65dh1 and sto65d < sto65dh1 and sto65dh1 > stoh and sto65dh1bar < sto65dL1bar) and (sto130d < sto130dh1 and sto130dh1 > stoh and sto130dh1bar < sto130dL1bar) then {stodh65n130hcon = 1;} if (sto65k > sto65dL1 and sto65d > sto65dL1 and sto65dL1 < stoL and sto65dL1bar < sto65dh1bar) and (sto130d > sto130dL1 and sto130dL1 < stoL and sto130dL1bar < sto130dh1bar) then {stodL65n130Lcon = 1;} if (sto65k < sto65dh1 and sto65d < sto65dh1 and sto65dh1 > stoh and sto65dh1bar < sto65dL1bar) or (sto130d < sto130dh1 and sto130dh1 > stoh and sto130dh1bar < sto130dL1bar) then {stodh65or130hcon = 1;} if (sto65k > sto65dL1 and sto65d > sto65dL1 and sto65dL1 < stoL and sto65dL1bar < sto65dh1bar) or (sto130d > sto130dL1 and sto130dL1 < stoL and sto130dL1bar < sto130dh1bar) then {stodL65or130Lcon = 1;} if (sto65k < sto65dh1 and sto65d < sto65dh1 and sto65dh1bar < sto65dL1bar) and (sto130d < sto130dh1 and sto130dh1bar < sto130dL1bar) then {stodh65n130downcon = 1;} if (sto65k > sto65dL1 and sto65d > sto65dL1 and sto65dL1bar < sto65dh1bar) and (sto130d > sto130dL1 and sto130dL1bar < sto130dh1bar) then {stodL65n130upcon = 1;} if (sto65k < sto65dh1 and sto65d < sto65dh1 and sto65dh1bar < sto65dL1bar) or (sto130d < sto130dh1 and sto130dh1bar < sto130dL1bar) then {stodh65or130downcon = 1;} if (sto65k > sto65dL1 and sto65d > sto65dL1 and sto65dL1bar < sto65dh1bar) or (sto130d > sto130dL1 and sto130dL1bar < sto130dh1bar) then {stodL65or130upcon = 1;} } // ---------- È£ÀÜ ÀÌÆòÀÇ ½Ö¹Ù´Ú, ½ÖºÀ¹× È£ÀÜÀÇ - => + ¶Ç´Â + => - ·Î ±Þº¯ ¿©ºÎ ÆÇ´Ü ---------- // {bapup = 0; bapdown = 0; upbidaskcon =0; bfupbidaskcon =0; downbidaskcon =0; bfdownbidaskcon =0; borbfupbidaskcon = 0; borbfdownbidaskcon = 0;} { if baph1 < baph2 and ((bap < bap[1] and !(bidask > bidask[1] and bidask[1] > bidask[2])) or (bidask < 0 and bidask < bidask[1] and bidask[1] < bidask[2])) then {bapdown = 2;}// È£ÀÜÀÌÆòÀÌ ½ÖºÀÀÎ °æ¿ì if bapL1 > bapL2 and ((bap > bap[1] and !(bidask < bidask[1] and bidask[1] < bidask[2])) or (bidask > 0 and bidask > bidask[1] and bidask[1] > bidask[2])) then {bapup = 2;}// È£ÀÜÀÌÆòÀÌ ½Ö¹Ù´ÚÀÎ °æ¿ì } { if dayindex() == 0 then {bidaskindex = 0;} if bidask > 0 and bidask[1] < 0 then {upbidaskcon = 1; bidaskindex = index;} if bidask < 0 and bidask[1] > 0 then {downbidaskcon = 1; bidaskindex = index;} } { if bidask[1] > 0 and bidask[2] < 0 then {bfupbidaskcon = 1;} if bidask[1] < 0 and bidask[2] > 0 then {bfdownbidaskcon = 1;} } { if upbidaskcon == 1 or bfupbidaskcon == 1 then {borbfupbidaskcon = 1;} if downbidaskcon == 1 or bfdownbidaskcon == 1 then {borbfdownbidaskcon = 1;} } { if dayindex() == 0 then {bidaskupcnt = 0; bidaskdowncnt = 0;} if bidask > 0 then {bidaskupcnt = bidaskupcnt + 1;}// ÀÏÁß È£ÀÜÀÌ + ÀΠȽ¼ö »êÃâ if bidask < 0 then {bidaskdowncnt = bidaskdowncnt + 1;}// ÀÏÁß È£ÀÜÀÌ - ÀΠȽ¼ö »êÃâ } // ---- ±ÝÀÏÁß È£ÀÜÀÇ »ó½Â¹ÝÀü, ¶Ç´Â Ç϶ô¹ÝÀü ¿©ºÎ ÆÇ´Ü---// { if dayindex() == 0 then {dayupbidaskcon = 0; daydownbidaskcon = 0;} for count = dayindex() downto 1 begin//°è»êÀÌ µÇ´Â ÃÑ ºÀÀÇ °¹¼ö { if upbidaskcon[count] == 1 then dayupbidaskcon = 1; if downbidaskcon[count] == 1 then daydownbidaskcon = 1; } End; } // ---------- ÀüÀÏ¹× ±ÝÀÏÁß 60ÀÌÆò¼±(ÀϺÀ 5ÀÌÆò¼±)ÀÇ ÃÖ°íÁ¡, ÃÖÀúÁ¡ °Ë»ö ----------// { if dayindex() == 0 then {daylestlp1 = lp1; dayhestlp1 = lp1; dayopenlp1 = lp1; bfdaycloselp = lp[1]; dayopenlp = lp; bfdaylestlp1 = daylestlp1[1]; bfdayhestlp1 = dayhestlp1[1]; bfdayopenlp1 = dayopenlp1[1]; daylp1L1bar = 0; daylp1h1bar = 0;} else if dayindex() > 0 then { if daylestlp1 > lp1[1] then daylestlp1 = lp1[1]; if dayhestlp1 < lp1[1] then dayhestlp1 = lp1[1]; } } { if lp1L1 > lp1L2 then { if lp1[1] == lp1L1 then {daylp1L1bar = index - 1;} if lp1[2] == lp1L1 then {daylp1L1bar = index - 2;} if lp1[3] == lp1L1 then {daylp1L1bar = index - 3;} } if lp1h1 < lp1h2 then { if lp1[1] == lp1h1 then {daylp1h1bar = index - 1;} if lp1[2] == lp1h1 then {daylp1h1bar = index - 2;} if lp1[3] == lp1h1 then {daylp1h1bar = index - 3;} } } // ---------- ÀüÀÏ¹× ±ÝÀÏÁß ºÀÀÇ »ó½Â, Ç϶ôÀÇ ÃÖ´ë°ª »êÃâ ----------// { if dayindex() == 0 then { dayopenupV = upV; dayopendownV = downV; dayopenC = C; dayupVcnt = 0; daydownVcnt = 0; dayupVsum = 0; daydownVsum = 0; if C >= O then {daybgstupV = upV; daybgstdownV = 0; dayupVcnt = dayupVcnt + 1; dayupVsum = dayupVsum + upV;} if C <= O then {daybgstupV = 0; daybgstdownV = downV; daydownVcnt = daydownVcnt + 1; daydownVsum = daydownVsum + downV;} bfdaybgstupV = daybgstupV[1]; bfdaybgstdownV = daybgstdownV[1]; } if dayindex() > 0 then { if daybgstupV < upV[1] then daybgstupV = upV[1]; if daybgstdownV < downV[1] then daybgstdownV = downV[1]; if C > O then {dayupVcnt = dayupVcnt + 1; dayupVsum = dayupVsum + upV;} if C < O then {daydownVcnt = daydownVcnt + 1; daydownVsum = daydownVsum + downV;} } } bgstupVcon = 0; bgstdownVcon = 0; { if ((upV > bfdaybgstdownV and upV >= daybgstdownV) or (upV >= bfdaybgstdownV and upV > daybgstdownV)) then {bgstupVcon = 1;} if ((downV > bfdaybgstupV and downV >= daybgstupV) or (downV >= bfdaybgstupV and downV > daybgstupV)) then {bgstdownVcon = 1;} } dayupVavg = 0; daydownVavg = 0; { dayupVavg = dayupVsum / dayupVcnt; daydownVavg = daydownVsum / daydownVcnt; } // ---------- ÀüÀÏ¹× ±ÝÀÏÁß ÃÖ´ë°Å·¡·® »êÃâ ----------// if dayindex() == 0 Then { dayopenvol = V; //´çÀÏ Ã¹ºÀ °Å·¡·® bfdayopenvol = dayopenvol[1]; //ÀüÀÏ Ã¹ºÀ °Å·¡·® daybgstvol = V; // ±ÝÀÏ ÃÖ°í °Å·¡·® ÃʱâÈ­ bfdaybgstvol = daybgstvol[1]; //ÀüÀÏÃÖ°í°Å·¡·® } if dayindex() > 0 Then { if V[1] > daybgstvol Then daybgstvol = V[1]; //´çÀÏ ÃÖ°í°Å·¡·® } bgstvolcon = 0; { if V > daybgstvol or V > bfdaybgstvol then {bgstvolcon = 1;} } // ---- ÀüÀÏÁß ºÀÀÇ °í°¡, Àú°¡°¡ 30ºÐ 20ÀÌÆò¼±¹× 720ÀÌÆò¼±À§ ¶Ç´Â ¹Ø¿¡ ÀÖ´ÂÁö ¿©ºÎ ÆÇ´Ü ---// if dayindex() == 0 then { bfdayuplpcnt = 0; bfdaydownlpcnt = 0; bfdayuplp4cnt = 0; bfdaydownlp4cnt = 0; for count = 12 downto 1 begin//°è»êÀÌ µÇ´Â ÃÑ ºÀÀÇ °¹¼ö { if C[count] > lp[count] then bfdayuplpcnt = bfdayuplpcnt + 1; if C[count] < lp[count] then bfdaydownlpcnt = bfdaydownlpcnt + 1; if C[count] > lp4[count] then bfdayuplp4cnt = bfdayuplp4cnt + 1; if C[count] < lp4[count] then bfdaydownlp4cnt = bfdaydownlp4cnt + 1; } End; } // ---- ±ÝÀÏÁß ºÀÀÇ °í°¡, Àú°¡°¡ 30ºÐ 20ÀÌÆò¼±¹× 720ÀÌÆò¼±À§ ¶Ç´Â ¹Ø¿¡ ÀÖ´ÂÁö ¿©ºÎ ÆÇ´Ü ---// { dayuplpcnt = 0; daydownlpcnt = 0; dayuplp4cnt = 0; daydownlp4cnt = 0; for count = dayindex() downto 1 begin//°è»êÀÌ µÇ´Â ÃÑ ºÀÀÇ °¹¼ö { if C[count] > lp[count] then dayuplpcnt = dayuplpcnt + 1; if C[count] < lp[count] then daydownlpcnt = daydownlpcnt + 1; if C[count] > lp4[count] then dayuplp4cnt = dayuplp4cnt + 1; if C[count] < lp4[count] then daydownlp4cnt = daydownlp4cnt + 1; } End; } // ---- ÃÖ±Ù ºÀ 15°³ÀÇ ÃÖ°í°¡, ÃÖÀú°¡¸¦ »êÃâÇÏ¿© Æø¿¡ µû¶ó û»ê ±ÝÁö ¿©ºÎ ÆÇ´Ü ---// {bar12high = H[11]; bar12low = L[11]; bar12dep = H - L;}//ÃʱâÈ­ //if dayindex() > 4 then { for count = 11 downto 0 begin//°è»êÀÌ µÇ´Â ÃÑ ºÀÀÇ °¹¼ö { if H[count] > bar12high then bar12high = H[count]; if L[count] < bar12low then bar12low = L[count]; // 1¾¿ Â÷°¨ÇÔ } End; bar12dep = bar12high - bar12low; } // ---- ÃÖ±Ù ºÀ 5°³ÀÇ ÃÖ°í°¡, ÃÖÀú°¡ÀÇ Æò±ÕÀ» »êÃâÇÏ¿© Æø¿¡ µû¶ó û»ê ¿©ºÎ ÆÇ´Ü ---// {bar6high = H[5]; bar6low = L[5]; bar6dep = H - L; bar6highavg = 0; bar6lowavg = 0; bar6highsum = 0; bar6lowsum = 0;} //if dayindex() > 4 then { for count = 5 downto 0 begin//°è»êÀÌ µÇ´Â ÃÑ ºÀÀÇ °¹¼ö { if H[count] > bar6high then bar6high = H[count]; if L[count] < bar6low then bar6low = L[count]; bar6highsum = bar6highsum + H[count]; bar6lowsum = bar6lowsum + L[count]; } End; bar6dep = bar6high - bar6low; bar6highavg = bar6highsum / 6; bar6lowavg = bar6lowsum / 6; } // ---------- ÅõÀÚ ½É¸®µµ ÀÛ¼º ----------// //if C >= dayopen(0) then { simsumV = 0; for simcount = 0 to simperiod-1 begin //°è»êÀÌ µÇ´Â ÃÑ ºÀÀÇ °¹¼ö if dayclose(simcount) > dayclose(simcount+1) then { //ÇöÀçºÀÀÌ ÀüºÀº¸´Ù Ŭ °æ¿ì simsumV = simsumV+1; // 1¾¿ ´©ÀûÇÔ } End; simri = simsumV/simperiod*100; //ÃÑ ÅõÀûÇÑ °ªÀ» ±â°£À¸·Î ³ª´©¾îÁÜ } // ---- ±ÝÀÏÁß Àå±âÀÌÆò¼±¹× À̰ݵµ, Åõ½ÉÀÇ ÃÖ°í°¡, ÃÖÀú°¡ »êÃâ---// { if dayindex() == 0 then {daylowlp2 = lp2; dayhighlp2 = lp2; daylowlp3 = lp3; dayhighlp3 = lp3; daylowlp4 = lp4; dayhighlp4 = lp4; daylowdisplp3 = displp3; dayhighdisplp3 = displp3; daylowsimri = simri; dayhighsimri = simri;} for count = dayindex() downto 1 begin//°è»êÀÌ µÇ´Â ÃÑ ºÀÀÇ °¹¼ö { if lp2[count] > dayhighlp2 then dayhighlp2 = lp2[count]; if lp2[count] < daylowlp2 then daylowlp2 = lp2[count]; if lp3[count] > dayhighlp3 then dayhighlp3 = lp3[count]; if lp3[count] < daylowlp3 then daylowlp3 = lp3[count]; if lp4[count] > dayhighlp4 then dayhighlp4 = lp4[count]; if lp4[count] < daylowlp4 then daylowlp4 = lp4[count]; if displp3[count] > dayhighdisplp3 then dayhighdisplp3 = displp3[count]; if displp3[count] < daylowdisplp3 then daylowdisplp3 = displp3[count]; if simri[count] > dayhighsimri then dayhighsimri = simri[count]; if simri[count] < daylowsimri then daylowsimri = simri[count]; } End; } // ---------- ºÀ Æò±Õ°ª ÀÛ¼º ----------// { plusb = 0; minusb = 0; plusc = 0; minusc = 0; plusbm = 0; minusbm = 0; for barcount = 0 to barperiod-1 begin //°è»êÀÌ µÇ´Â ÃÑ ºÀÀÇ °¹¼ö if C[barcount] > O[barcount] then { plusb = plusb + C[barcount] - O[barcount]; plusc = plusc + 1; } if C[barcount] < O[barcount] then { minusb = minusb + O[barcount] - C[barcount]; minusc = minusc + 1; // 1¾¿ ´©ÀûÇÔ } End if plusc > 0 then {plusbm = plusb/plusc;} if minusc > 0 then {minusbm = minusb/minusc;} //ºÀ°ª´©ÀûºÐÀ» ºÀ°¹¼ö·Î ³ª´©¾îÁÜ } // ---------- Ⱦº¸ÈÄ »ó½Â¹× Ç϶ô ¿©ºÎ ÆÇ´Ü ·çƾ ---------- // {uphbbarcon = 0; uphb5con = 0; uphb10con = 0; uphb20con = 0; uphbbapcon = 0; downhbbarcon = 0; downhb5con = 0; downhb10con = 0; downhb20con = 0; downhbbapcon = 0;} { if (C[1] - C[3] < C - C[1] and C[1] - C[3] >= -0.1) or (C[1] - C[2] < C - C[1] and C[1] - C[2] > 0) then {uphbbarcon = 1;} if ((sp[1] - sp[3] < sp - sp[1] and sp[1] - sp[3] >= -0.1) or (sp[1] - sp[2] < sp - sp[1] and sp[1] - sp[2] > 0) or (sp[2] - sp[3] < sp[1] - sp[2] and sp[2] - sp[3] > 0 and C > O and C[1] > O[1] and C[1] > H[2] and upV > upV1)) and sp > sp[1] then {uphb5con = 1;} if ((mp[1] - mp[3] < mp - mp[1] and mp[1] - mp[3] >= -0.1) or (mp[1] - mp[2] < mp - mp[1] and mp[1] - mp[2] > 0) or (mp[2] - mp[3] < mp[1] - mp[2] and mp[2] - mp[3] > 0 and C > O and C[1] > O[1] and C[1] > H[2] and upV > upV1)) and mp > mp[1] then {uphb10con = 1;} if ((lp[1] - lp[3] < lp - lp[1] and lp[1] - lp[3] >= -0.1) or (lp[1] - lp[2] < lp - lp[1] and lp[1] - lp[2] > 0) or (lp[2] - lp[3] < lp[1] - lp[2] and lp[2] - lp[3] > 0 and C > O and C[1] > O[1] and C[1] > H[2] and upV > upV1)) and lp > lp[1] then {uphb20con = 1;} if ((bap[1] - bap[3] < bap - bap[1] and bap[1] - bap[3] >= -0.1) or (bap[1] - bap[2] < bap - bap[1] and bap[1] - bap[2] > 0) or (bap[2] - bap[3] < bap[1] - bap[2] and bap[2] - bap[3] > 0 and C > O and C[1] > O[1] and C[1] > H[2] and upV > upV1)) and bap > bap[1] then {uphbbapcon = 1;} } { if (C[1] - C[3] > C - C[1] and C[1] - C[3] <= 0.1) or (C[1] - C[2] > C - C[1] and C[1] - C[2] < 0) then {downhbbarcon = 1;} if ((sp[1] - sp[3] > sp - sp[1] and sp[1] - sp[3] <= 0.1) or (sp[1] - sp[2] > sp - sp[1] and sp[1] - sp[2] < 0) or (sp[2] - sp[3] > sp[1] - sp[2] and sp[2] - sp[3] < 0 and C < O and C[1] < O[1] and C[1] < L[2] and downV > downV1)) and sp < sp[1] then {downhb5con = 1;} if ((mp[1] - mp[3] > mp - mp[1] and mp[1] - mp[3] <= 0.1) or (mp[1] - mp[2] > mp - mp[1] and mp[1] - mp[2] < 0) or (mp[2] - mp[3] > mp[1] - mp[2] and mp[2] - mp[3] < 0 and C < O and C[1] < O[1] and C[1] < L[2] and downV > downV1)) and mp < mp[1] then {downhb10con = 1;} if ((lp[1] - lp[3] > lp - lp[1] and lp[1] - lp[3] <= 0.1) or (lp[1] - lp[2] > lp - lp[1] and lp[1] - lp[2] < 0) or (lp[2] - lp[3] > lp[1] - lp[2] and lp[2] - lp[3] < 0 and C < O and C[1] < O[1] and C[1] < L[2] and downV > downV1)) and lp < lp[1] then {downhb20con = 1;} if ((bap[1] - bap[3] > bap - bap[1] and bap[1] - bap[3] <= 0.1) or (bap[1] - bap[2] > bap - bap[1] and bap[1] - bap[2] < 0) or (bap[2] - bap[3] > bap[1] - bap[2] and bap[2] - bap[3] < 0 and C < O and C[1] < O[1] and C[1] < L[2] and downV > downV1)) and bap < bap[1] then {downhbbapcon = 1;} } // ---------- Á¤¹è¿­, ¿ª¹è¿­ °øÅë ·çÆ¾ ---------- // {jeong = 0; yeog = 0; bfjeong = 0; bfyeog = 0;} { if sp >= mp and mp > lp and sp > sp[1] and mp > mp[1] and lp > lp[1] then { if lp >= lp1 and lp1 > lp1[1] then {jeong = 2;} else {jeong = 1;} } if sp <= mp and mp < lp and sp < sp[1] and mp < mp[1] and lp < lp[1] then { if lp <= lp1 and lp1 < lp1[1] then {yeog = 2;} else {yeog = 1;} } } { if sp[1] >= mp[1] and mp[1] > lp[1] and sp[1] > sp[2] and mp[1] > mp[2] and lp[1] > lp[2] then { if lp[1] >= lp1[1] and lp1[1] > lp1[2] then {bfjeong = 2;} else {bfjeong = 1;} } if sp[1] <= mp[1] and mp[1] < lp[1] and sp[1] < sp[2] and mp[1] < mp[2] and lp[1] < lp[2] then { if lp[1] <= lp1[1] and lp1[1] < lp1[2] then {bfyeog = 2;} else {bfyeog = 1;} } } // ---------- ÀÌÆò¼±(5,10,20,60,120,240,720)ÀÇ ¹è¿­ »óÅ·ΠÃß¼¼ ÆÇ´Ü ---------- // spdupcon = 0; { if sp > sp[1] and spL1 > spL2 then {spdupcon = 1;} if sp < sp[1] and sph1 < sph2 then {spdupcon = -1;} } mpdupcon = 0; { if mp > mp[1] and mpL1 > mpL2 then {mpdupcon = 1;} if mp < mp[1] and mph1 < mph2 then {mpdupcon = -1;} } lpdupcon = 0; { if lp > lp[1] and lpL1 > lpL2 then {lpdupcon = 1;} if lp < lp[1] and lph1 < lph2 then {lpdupcon = -1;} } spmpdupcon = 0; { if ((spdupcon > 0 and spL1 > mp) or (uphb5con == 1 and sp[3] >= mp[3])) and mp > mp[1] and sp > mp then {spmpdupcon = 1;} if ((spdupcon < 0 and sph1 < mp) or (downhb5con == 1 and sp[3] <= mp[3])) and mp < mp[1] and sp < mp then {spmpdupcon = -1;} } splpdupcon = 0; { if ((spdupcon > 0 and spL1 > lp) or (uphb5con == 1 and sp[3] >= lp[3])) and lp > lp[1] and sp > lp then {splpdupcon = 1;} if ((spdupcon < 0 and sph1 < lp) or (downhb5con == 1 and sp[3] <= lp[3])) and lp < lp[1] and sp < lp then {splpdupcon = -1;} } mplpdupcon = 0; { if ((mpdupcon > 0 and mpL1 > lp) or (uphb10con == 1 and mp[3] >= lp[3])) and lp > lp[1] and mp > lp then {mplpdupcon = 1;} if ((mpdupcon < 0 and mph1 < lp) or (downhb10con == 1 and mp[3] <= lp[3])) and lp < lp[1] and mp < lp then {mplpdupcon = -1;} } spmpnlpdupcon = 0; { if spmpdupcon == 1 or splpdupcon == 1 or mplpdupcon == 1 then spmpnlpdupcon = 1; if spmpdupcon == -1 or splpdupcon == -1 or mplpdupcon == -1 then spmpnlpdupcon = -1; } splp1dupcon = 0; { if ((spdupcon > 0 and spL1 > lp1) or (uphb5con == 1 and sp[3] >= lp1[3])) and lp1 > lp1[1] and sp > lp1 then {splp1dupcon = 1;} if ((spdupcon < 0 and sph1 < lp1) or (downhb5con == 1 and sp[3] <= lp1[3])) and lp1 < lp1[1] and sp < lp1 then {splp1dupcon = -1;} } mplp1dupcon = 0; { if ((mpdupcon > 0 and mpL1 > lp1) or (uphb10con == 1 and mp[3] >= lp1[3])) and lp1 > lp1[1] and mp > lp1 then {mplp1dupcon = 1;} if ((mpdupcon < 0 and mph1 < lp1) or (downhb10con == 1 and mp[3] <= lp1[3])) and lp1 < lp1[1] and mp < lp1 then {mplp1dupcon = -1;} } lplp1dupcon = 0; { if ((lpdupcon > 0 and lpL1 > lp1) or (uphb20con == 1 and lp[3] >= lp1[3])) and lp1 > lp1[1] and lp > lp1 then {lplp1dupcon = 1;} if ((lpdupcon < 0 and lph1 < lp1) or (downhb20con == 1 and lp[3] <= lp1[3])) and lp1 < lp1[1] and lp < lp1 then {lplp1dupcon = -1;} } mplp2dupcon = 0; { if ((mpdupcon > 0 and mpL1 > lp2) or (uphb10con == 1 and mp[3] >= lp2[3])) and lp2 > lp2[1] and mp > lp2 then {mplp2dupcon = 1;} if ((mpdupcon < 0 and mph1 < lp2) or (downhb10con == 1 and mp[3] <= lp2[3])) and lp2 < lp2[1] and mp < lp2 then {mplp2dupcon = -1;} } lplp2dupcon = 0; { if ((lpdupcon > 0 and lpL1 > lp2) or (uphb20con == 1 and lp[3] >= lp2[3])) and lp2 > lp2[1] and lp > lp2 then {lplp2dupcon = 1;} if ((lpdupcon < 0 and lph1 < lp2) or (downhb20con == 1 and lp[3] <= lp2[3])) and lp2 < lp2[1] and lp < lp2 then {lplp2dupcon = -1;} } mplpnlp12dupcon = 0; { if mplp1dupcon == 1 or lplp1dupcon == 1 or mplp2dupcon == 1 or lplp2dupcon == 1 then mplpnlp12dupcon = 1; if mplp1dupcon == -1 or lplp1dupcon == -1 or mplp2dupcon == -1 or lplp2dupcon == -1 then mplpnlp12dupcon = -1; } lp1dupcon = 0; { if sp > lp1 and lp1L1 > lp1L2 and lp1 > lp1[1] and lp1[1] > lp1[2] and lp1L1bar < 36 then {lp1dupcon = 1;} if sp < lp1 and lp1h1 < lp1h2 and lp1 < lp1[1] and lp1[1] < lp1[2] and lp1h1bar < 36 then {lp1dupcon = -1;} } lp2dupcon = 0; { if sp > lp2 and lp2L1 > lp2L2 and lp2 > lp2[1] and lp2L1bar < 36 then {lp2dupcon = 1;} if sp < lp2 and lp2h1 < lp2h2 and lp2 < lp2[1] and lp2h1bar < 36 then {lp2dupcon = -1;} } spnlp1234con = 0; { if sp > lp1 and sp > lp2 and sp > lp3 then { if sp > lp4 then {spnlp1234con = 2;} else {spnlp1234con = 1;} } if sp < lp1 and sp < lp2 and sp < lp3 then { if sp < lp4 then {spnlp1234con = -2;} else {spnlp1234con = -1;} } } Cnlp1234con = 0; { if C > lp1 and C > lp2 and C > lp3 then { if C > lp4 then {Cnlp1234con = 2;} else {Cnlp1234con = 1;} } if C < lp1 and C < lp2 and C < lp3 then { if C < lp4 then {Cnlp1234con = -2;} else {Cnlp1234con = -1;} } } splp01dr = 0; { if sp > lp and lp > lp1 and lp > lp[1] and (lp1 > lp1[1] or (sp > lp1 and lp1 > daylestlp1 and lp1[1] > lp1[2])) then {splp01dr = 1;} if sp < lp and lp < lp1 and lp < lp[1] and lp1 < lp1[1] then {splp01dr = -1;} } splp1234dr = 0; { if sp > lp1 and (lp1 > lp1[1] or (sp > lp1 and lp1 > daylestlp1 and lp1[1] > lp1[2])) then { if lp1 >= lp2 and lp2 > lp2[1] and lp2 >= lp3 and lp3 > lp3[1] and lp3 >= lp4 and lp4 > lp4[1] then {splp1234dr = 4;}// Àå±â »ó½ÂÃß¼¼ÀÎ °æ¿ì else if lp1 >= lp2 and lp2 > lp2[1] and lp2 >= lp3 and lp3 > lp3[1] then {splp1234dr = 3;} else if lp1 >= lp2 and lp2 > lp2[1] then {splp1234dr = 2;} else {splp1234dr = 1;} } if sp < lp1 and lp1 < lp1[1] then { if lp1 <= lp2 + 0.1 and lp2 < lp2[1] and lp2 <= lp3 and lp3 < lp3[1] and lp3 <= lp4 and lp4 < lp4[1] then {splp1234dr = -4;} else if lp1 <= lp2 + 0.1 and lp2 < lp2[1] and lp2 <= lp3 and lp3 < lp3[1] then {splp1234dr = -3;} else if lp1 <= lp2 + 0.1 and lp2 < lp2[1] then {splp1234dr = -2;} else {splp1234dr = -1;} } } lp0123dr = 0; { if lp >= lp1 and lp > lp[1] and (lp1 > lp1[1] or (sp > lp1 and lp1 > daylestlp1 and lp1[1] > lp1[2])) then {lp0123dr = 1;}// Ãʱ⠻ó½ÂÃß¼¼ÀÎ °æ¿ì if lp >= lp1 and lp > lp[1] and (lp1 > lp1[1] or (sp > lp1 and lp1 > daylestlp1 and lp1[1] > lp1[2])) then { if (lp1 >= lp2 and lp2 > lp2[1] ) or (lp1 >= lp3 and lp3 > lp3[1] ) then { if sp > lp2 and sp > lp3 and lp2 > lp2[1] and lp3 > lp3[1] then {lp0123dr = 2;}// Á߱⠻ó½ÂÃß¼¼ÀÎ °æ¿ì } if lp1 >= lp2 and lp2 >= lp3 and lp2 > lp2[1] then {lp0123dr = 2;}// Àå±â »ó½ÂÃß¼¼ÀÎ °æ¿ì if lp1 >= lp2 and lp2 >= lp3 and lp2 > lp2[1] and lp3 > lp3[1] then {lp0123dr = 3;}// Àå±â »ó½ÂÃß¼¼ÀÎ °æ¿ì } } { if lp <= lp1 and lp < lp[1] and lp1 < lp1[1] then {lp0123dr = -1;}//Ãʱâ Ç϶ôÃß¼¼ÀÎ °æ¿ì if lp <= lp1 and lp < lp[1] and lp1 < lp1[1] then { if (lp1 <= lp2 + Faddbox and lp2 < lp2[1] ) or (lp1 <= lp3 + Faddbox and lp3 < lp3[1] ) then { if sp < lp2 and sp < lp3 and lp2 < lp2[1] and lp3 < lp3[1] then {lp0123dr = -2;}// Áß±â Ç϶ôÃß¼¼ÀÎ °æ¿ì } if lp1 <= lp2 + Faddbox and (lp2 <= lp3 + Faddbox or spnlp1234con < 0) and lp2 < lp2[1] then {lp0123dr = -2;}// Àå±â Ç϶ôÃß¼¼ÀÎ °æ¿ì if lp1 <= lp2 + Faddbox and lp2 <= lp3 + Faddbox and lp2 < lp2[1] and lp3 < lp3[1] then {lp0123dr = -3;}// Àå±â Ç϶ôÃß¼¼ÀÎ °æ¿ì } } lp123dr = 0; { if lp1 >= lp2 and lp2 >= lp3 and lp1 > lp1[1] and lp2 > lp2[1] then { if lp3 > lp3[1] then {lp123dr = 2;} else {lp123dr = 1;} } if lp1 <= lp2 and lp2 <= lp3 and lp1 < lp1[1] and lp2 < lp2[1] then { if lp3 < lp3[1] then {lp123dr = -2;} else {lp123dr = -1;} } } lp023dr = 0; { if lp1 >= lp2 and lp2 >= lp3 and lp2 > lp2[1] and lp3 > lp3[1] then { if lp3 >= lp4 or (lp >= lp2 and lp > lp[1] and (lp[1] > lp[2] or jeong > 0 or sp > lp)) then {lp023dr = 1;}// Á߱⠻ó½ÂÃß¼¼ÀÎ °æ¿ì } if lp1 <= lp2 and lp2 <= lp3 and lp2 < lp2[1] and lp3 < lp3[1] then { if lp3 <= lp4 or (lp <= lp2 and lp < lp[1] and (lp[1] < lp[2] or yeog > 0 or sp < lp)) then {lp023dr = -1;}// Á߱⠻ó½ÂÃß¼¼ÀÎ °æ¿ì } } lp1234dr = 0; { if lp1 >= lp2 and lp2 >= lp3 - 0.05 and (lp1 > lp1[1] or (sp > lp1 and lp1 > daylestlp1 and lp1[1] > lp1[2])) and lp2 > lp2[1] and lp3 > lp3[1] then { if lp3 >= lp4 and lp4 > lp4[1] then {lp1234dr = 2;}// Àå±â »ó½ÂÃß¼¼ÀÎ °æ¿ì else {lp1234dr = 1;}// Àå±â »ó½ÂÃß¼¼ÀÎ °æ¿ì } if lp1 <= lp2 + 0.1 and lp2 <= lp3 and lp1 < lp1[1] and lp2 < lp2[1] and lp3 < lp3[1] then { if lp3 <= lp4 and lp4 < lp4[1] then {lp1234dr = -2;}// Àå±â Ç϶ôÃß¼¼ÀÎ °æ¿ì else {lp1234dr = -1;}// Àå±â Ç϶ôÃß¼¼ÀÎ °æ¿ì } } bflp1234dr = 0; { if lp1[1] >= lp2[1] and lp2[1] >= lp3[1] and lp1[1] > lp1[2] and lp2[1] > lp2[2] and lp3[1] > lp3[2] then { if lp3[1] >= lp4[1] and lp4[1] > lp4[2] then {bflp1234dr = 2;}// Àå±â »ó½ÂÃß¼¼ÀÎ °æ¿ì else {bflp1234dr = 1;}// Àå±â »ó½ÂÃß¼¼ÀÎ °æ¿ì } if lp1[1] <= lp2[1] + Faddbox and lp2[1] <= lp3[1] and lp1[1] < lp1[2] and lp2[1] < lp2[2] and lp3[1] < lp3[2] then { if lp3[1] <= lp4[1] and lp4[1] < lp4[2] then {bflp1234dr = -2;}// Àå±â Ç϶ôÃß¼¼ÀÎ °æ¿ì else {bflp1234dr = -1;}// Àå±â Ç϶ôÃß¼¼ÀÎ °æ¿ì } } lp124dr = 0; { if lp1 >= lp2 and lp2 >= lp4 and lp1 > lp1[1] and lp2 > lp2[1] and lp4 > lp4[1] then {lp124dr = 1;}// Àå±â »ó½ÂÃß¼¼ÀÎ °æ¿ì if lp1 <= lp2 and lp2 <= lp4 and lp1 < lp1[1] and lp2 < lp2[1] and lp4 < lp4[1] then {lp124dr = -1;}// Àå±â Ç϶ôÃß¼¼ÀÎ °æ¿ì } lp134dr = 0; { if lp1 >= lp3 and lp3 >= lp4 and lp1 > lp1[1] and lp3 > lp3[1] and lp4 > lp4[1] then {lp134dr = 1;}// Àå±â »ó½ÂÃß¼¼ÀÎ °æ¿ì if lp1 <= lp3 and lp3 <= lp4 and lp1 < lp1[1] and lp3 < lp3[1] and lp4 < lp4[1] then {lp134dr = -1;}// Àå±â Ç϶ôÃß¼¼ÀÎ °æ¿ì } lp234dr = 0; // ÁÂÃøÅ¬¸®¾î·çƾ Àû¿ë½Ã ¼öÀÍÀÌ ¸¹ÀÌ ÀúÇϵǴ ¿øÀαԸíÈÄ Àû¿ëÇØ¾ß ÇÔ. { if lp2 >= lp3 and lp3 >= lp4 and lp2 > lp2[1] and lp3 > lp3[1] and lp4 > lp4[1] and ((lp1 >= lp2 - 0.5 or (lp1 >= lp2 - 1 and lp123convercon == 0) or (lp1 > lp1[1] and lp1 >= lp3)) or (lp1 > lp3 and C > lp1 and C > lp2 and boxupcnt > 1)) then {lp234dr = 1;}// Àå±â »ó½ÂÃß¼¼ÀÎ °æ¿ì if lp2 <= lp3 and lp3 <= lp4 and lp2 < lp2[1] and lp3 < lp3[1] and lp4 < lp4[1] and ((lp1 <= lp2 + 0.5 or (lp1 <= lp2 + 1 and lp123convercon == 0) or (lp1 < lp1[1] and lp1 <= lp3)) or (lp1 < lp3 and C < lp1 and C < lp2 and boxdowncnt > 1)) then {lp234dr = -1;}// Àå±â Ç϶ôÃß¼¼ÀÎ °æ¿ì } {uplonglpdr = 0; downlonglpdr = 0;} { if (lp1234dr > 0 or lp123dr > 0 or lp134dr > 0 or lp124dr > 0 or lp023dr > 0 or lp234dr > 0) then {uplonglpdr = 1;} if (lp1234dr < 0 or lp123dr < 0 or lp134dr < 0 or lp124dr < 0 or lp023dr < 0 or lp234dr < 0) then {downlonglpdr = 1;} } {uplongtrend = 0; downlongtrend = 0;} { if (lp1234dr > 0 or lp123dr > 0 or lp134dr > 0 or lp124dr > 0 or lp023dr > 0 or lp234dr > 0) or (lp1dupcon > 0 and uplonglpdr >= 0) then {uplongtrend = 1;} if (lp1234dr < 0 or lp123dr < 0 or lp134dr < 0 or lp124dr < 0 or lp023dr < 0 or lp234dr < 0) or (lp1dupcon < 0 and downlonglpdr >= 0) then {downlongtrend = 1;} } shorttrend = 0; { if spmpdupcon > 0 or splpdupcon > 0 or mplpdupcon > 0 then {shorttrend = 1;} if spmpdupcon < 0 or splpdupcon < 0 or mplpdupcon < 0 then {shorttrend = -1;} } midtrend = 0; { if mplp1dupcon > 0 or lplp1dupcon > 0 or splp01dr > 0 or lp0123dr > 0 then {midtrend = 1;} if mplp1dupcon < 0 or lplp1dupcon < 0 or splp01dr < 0 or lp0123dr < 0 then {midtrend = -1;} } // ---------- »óÇâ½Ã ÀÌÆò¼±ÀÇ ÀúÇ×¹× ÇÏÇâ½Ã ÀÌÆò¼±ÀÇ ÁöÁö¸¦ ÆÇ´Ü ---------- // {lp1crupresist = 0; lp2crupresist = 0; lp3crupresist = 0; lp4crupresist = 0; lpcrupresist = 0; lp1crdownresist = 0; lp2crdownresist = 0; lp3crdownresist = 0; lp4crdownresist = 0; lpcrdownresist = 0;} {// ¾ÕÀÇ ºÀ ¶Ç´Â ÇöÀçºÀÀÌ ÀÌÆò¼±µ¹ÆÄ ÈÄ ÇöÀçºÀÀÌ ´Ù½Ã ±× ÀÌÆò¼± ÁöÁö, ÀúÇ×¹Þ´Â ¸ð½À if (H[1] > lp1 or H > lp1 or dayhigh(0)[1] > lp1) and C < lp1 then {lp1crupresist = 1;} if (H[1] > lp2 or H > lp2 or dayhigh(0)[1] > lp2) and C < lp2 then {lp2crupresist = 1; lpcrupresist = lpcrupresist + 1;} if (H[1] > lp3 or H > lp3 or dayhigh(0)[1] > lp3) and C < lp3 then {lp3crupresist = 1; lpcrupresist = lpcrupresist + 1;} if (H[1] > lp4 or H > lp4 or dayhigh(0)[1] > lp4) and C < lp4 then {lp4crupresist = 1; lpcrupresist = lpcrupresist + 1;} if (L[1] < lp1 or L < lp1 or daylow(0)[1] < lp1) and C > lp1 then {lp1crdownresist = 1;} if (L[1] < lp2 or L < lp2 or daylow(0)[1] < lp2) and C > lp2 then {lp2crdownresist = 1; lpcrdownresist = lpcrdownresist + 1;} if (L[1] < lp3 or L < lp3 or daylow(0)[1] < lp3) and C > lp3 then {lp3crdownresist = 1; lpcrdownresist = lpcrdownresist + 1;} if (L[1] < lp4 or L < lp4 or daylow(0)[1] < lp4) and C > lp4 then {lp4crdownresist = 1; lpcrdownresist = lpcrdownresist + 1;} } {lp1shupresist = 0; lp2shupresist = 0; lp3shupresist = 0; lp4shupresist = 0; lpshupresist = 0; lp1shdownresist = 0; lp2shdownresist = 0; lp3shdownresist = 0; lp4shdownresist = 0; lpshdownresist = 0;} {// ÀÏÁß ÃÖ°í°¡ ¶Ç´Â ÃÖÀú°¡°¡ ÀÌÆò¼±µ¹ÆÄ ÈÄ ÇöÀç ºÀÀÌ ´Ù½Ã ±× ÀÌÆò¼± ÁöÁö, ÀúÇ×¹Þ´Â ¸ð½À if dayhigh(0) > lp1 - 1 and C < lp1 then {lp1shupresist = 1;} if dayhigh(0) > lp2 - 1 and C < lp2 then {lp2shupresist = 1; lpshupresist = lpshupresist + 1;} if dayhigh(0) > lp3 - 1 and C < lp3 then {lp3shupresist = 1; lpshupresist = lpshupresist + 1;} if dayhigh(0) > lp4 - 1 and C < lp4 then {lp4shupresist = 1; lpshupresist = lpshupresist + 1;} if daylow(0) < lp1 + 1 and C > lp1 then {lp1shdownresist = 1;} if daylow(0) < lp2 + 1 and C > lp2 then {lp2shdownresist = 1; lpshdownresist = lpshdownresist + 1;} if daylow(0) < lp3 + 1 and C > lp3 then {lp3shdownresist = 1; lpshdownresist = lpshdownresist + 1;} if daylow(0) < lp4 + 1 and C > lp4 then {lp4shdownresist = 1; lpshdownresist = lpshdownresist + 1;} } {lp1crupcon = 0; lp2crupcon = 0; lp3crupcon = 0; lp4crupcon = 0; lpcrupcon = 0; lp1crdowncon = 0; lp2crdowncon = 0; lp3crdowncon = 0; lp4crdowncon = 0; lpcrdowncon = 0;} {// ¾ÕÀÇ ºÀ ¶Ç´Â ÇöÀçºÀÀÌ ÀÌÆò¼±µ¹ÆÄ ÈÄ ÇöÀçºÀÀÌ ´Ù½Ã ±× ÀÌÆò¼± ÁöÁö, ÀúÇ×¹Þ´Â ¸ð½À if (H[1] > lp1 or H > lp1) and C < lp1 + 0.5 then {lp1crupcon = 1;} if (H[1] > lp2 or H > lp2) and C < lp2 + 0.5 then {lp2crupcon = 1; lpcrupcon = lpcrupcon + 1;} if (H[1] > lp3 or H > lp3) and C < lp3 + 0.5 then {lp3crupcon = 1; lpcrupcon = lpcrupcon + 1;} if (H[1] > lp4 or H > lp4) and C < lp4 + 0.5 then {lp4crupcon = 1; lpcrupcon = lpcrupcon + 1;} if (L[1] < lp1 or L < lp1) and C > lp1 - 0.5 then {lp1crdowncon = 1;} if (L[1] < lp2 or L < lp2) and C > lp2 - 0.5 then {lp2crdowncon = 1; lpcrdowncon = lpcrdowncon + 1;} if (L[1] < lp3 or L < lp3) and C > lp3 - 0.5 then {lp3crdowncon = 1; lpcrdowncon = lpcrdowncon + 1;} if (L[1] < lp4 or L < lp4) and C > lp4 - 0.5 then {lp4crdowncon = 1; lpcrdowncon = lpcrdowncon + 1;} } // ---------- »óÇâ½Ã ¹Ú½º±Ç »ó´ÜÀÇ ÀúÇ×¹× ÇÏÇâ½Ã ¹Ú½º±Ç ÇÏ´ÜÀÇ ÁöÁö¸¦ ÆÇ´Ü ---------- // {d1crupresist = 0; d2crupresist = 0; d3crupresist = 0; d4crupresist = 0; boxcrupresist = 0; d1crdownresist = 0; d2crdownresist = 0; d3crdownresist = 0; d4crdownresist = 0; boxcrdownresist = 0;} { if (H[1] > dayhigh(1) or H > dayhigh(1) or dayhigh(0)[1] > dayhigh(1)) and C <= dayhigh(1) then {d1crupresist = 1;} if (H[1] > dayhigh(2) or H > dayhigh(2) or dayhigh(0)[1] > dayhigh(2) or dayhigh(1) > dayhigh(2)) and C <= dayhigh(2) then {d2crupresist = 1; boxcrupresist = boxcrupresist + 1;} if (H[1] > dayhigh(3) or H > dayhigh(3) or dayhigh(0)[1] > dayhigh(3) or dayhigh(1) > dayhigh(3)) and C <= dayhigh(3) then {d3crupresist = 1; boxcrupresist = boxcrupresist + 1;} if (H[1] > dayhigh(4) or H > dayhigh(4) or dayhigh(0)[1] > dayhigh(4) or dayhigh(1) > dayhigh(4)) and C <= dayhigh(4) then {d4crupresist = 1; boxcrupresist = boxcrupresist + 1;} if (L[1] < daylow(1) or L < daylow(1) or daylow(0)[1] < daylow(1)) and C >= daylow(1) then {d1crdownresist = 1;} if (L[1] < daylow(2) or L < daylow(2) or daylow(0)[1] < daylow(2) or daylow(1) < daylow(2)) and C >= daylow(2) then {d2crdownresist = 1; boxcrdownresist = boxcrdownresist + 1;} if (L[1] < daylow(3) or L < daylow(3) or daylow(0)[1] < daylow(3) or daylow(1) < daylow(3)) and C >= daylow(3) then {d3crdownresist = 1; boxcrdownresist = boxcrdownresist + 1;} if (L[1] < daylow(4) or L < daylow(4) or daylow(0)[1] < daylow(4) or daylow(1) < daylow(4)) and C >= daylow(4) then {d4crdownresist = 1; boxcrdownresist = boxcrdownresist + 1;} } {d1shupresist = 0; d2shupresist = 0; d3shupresist = 0; d4shupresist = 0; boxshupresist = 0; d1shdownresist = 0; d2shdownresist = 0; d3shdownresist = 0; d4shdownresist = 0; boxshdownresist = 0;} { if dayhigh(0) > dayhigh(1) - 1 and C <= dayhigh(1) then {d1shupresist = 1;} if (dayhigh(0) > dayhigh(2) - 1 or dayhigh(1) > dayhigh(2)) and C <= dayhigh(2) then {d2shupresist = 1; boxshupresist = boxshupresist + 1;} if (dayhigh(0) > dayhigh(3) - 1 or dayhigh(1) > dayhigh(3)) and C <= dayhigh(3) then {d3shupresist = 1; boxshupresist = boxshupresist + 1;} if (dayhigh(0) > dayhigh(4) - 1 or dayhigh(1) > dayhigh(4)) and C <= dayhigh(4) then {d4shupresist = 1; boxshupresist = boxshupresist + 1;} if daylow(0) < daylow(1) + 1 and C >= daylow(1) then {d1shdownresist = 1;} if (daylow(0) < daylow(2) + 1 or daylow(1) < daylow(2)) and C >= daylow(2) then {d2shdownresist = 1; boxshdownresist = boxshdownresist + 1;} if (daylow(0) < daylow(3) + 1 or daylow(1) < daylow(3)) and C >= daylow(3) then {d3shdownresist = 1; boxshdownresist = boxshdownresist + 1;} if (daylow(0) < daylow(4) + 1 or daylow(1) < daylow(4)) and C >= daylow(4) then {d4shdownresist = 1; boxshdownresist = boxshdownresist + 1;} } {box7shupresist = 0; box7shdownresist = 0;} { //if C <= dayhigh(1) + depvaluemin and C >= daylow(1) then {box7shupresist = box7shupresist + 1;} //if C <= dayhigh(2) + depvaluemin and C >= daylow(2) then {box7shupresist = box7shupresist + 1;} if C <= dayhigh(3) + depvaluemin and C >= daylow(3) then {box7shupresist = box7shupresist + 1;} if C <= dayhigh(4) + depvaluemin and C >= daylow(4) then {box7shupresist = box7shupresist + 1;} if C <= dayhigh(5) + depvaluemin and C >= daylow(5) then {box7shupresist = box7shupresist + 1;} if C <= dayhigh(6) + depvaluemin and C >= daylow(6) then {box7shupresist = box7shupresist + 1;} if C <= dayhigh(7) + depvaluemin and C >= daylow(7) then {box7shupresist = box7shupresist + 1;} //if C >= daylow(1) - depvaluemin and C <= dayhigh(1) then {box7shdownresist = box7shdownresist + 1;} //if C >= daylow(2) - depvaluemin and C <= dayhigh(2) then {box7shdownresist = box7shdownresist + 1;} //if C >= daylow(3) - depvaluemin and C <= dayhigh(3) then {box7shdownresist = box7shdownresist + 1;} if C >= daylow(4) - depvaluemin and C <= dayhigh(4) then {box7shdownresist = box7shdownresist + 1;} if C >= daylow(5) - depvaluemin and C <= dayhigh(5) then {box7shdownresist = box7shdownresist + 1;} if C >= daylow(6) - depvaluemin and C <= dayhigh(6) then {box7shdownresist = box7shdownresist + 1;} if C >= daylow(7) - depvaluemin and C <= dayhigh(7) then {box7shdownresist = box7shdownresist + 1;} } // ---------- ÀϺÀ ÀÌÆò¼±¹× ¹Ú½º±ÇÀÇ ¼ö·ÅÇü ¿©ºÎ ÆÇ´Ü ---------- // {lp1234convercon = 0; lp123convercon = 0; lp123n4convercon = 0; lp123or4convercon = 0;} { if max(lp1,lp2,lp3) - min(lp1,lp2,lp3) < 1.7 then {lp123convercon = 1;} if max(lp1,lp2,lp3,lp4) - min(lp1,lp2,lp3,lp4) < 4 then {lp1234convercon = 1;} if lp123convercon == 1 and lp1234convercon == 1 then {lp123n4convercon = 1;} if lp123convercon == 1 or lp1234convercon == 1 then {lp123or4convercon = 1;} } boxconvercon = 0; { if (dayhigh(3) + Faddbox >= dayhigh(2) and dayhigh(2) + Faddbox >= dayhigh(1) and daylow(3) - Faddbox <= daylow(2) and daylow(2) - Faddbox <= daylow(1) and C <= d3boxhigh and C >= d3boxlow) or (dayhigh(2) > dayhigh(1) and dayhigh(2) > dayhigh(0) and daylow(2) < daylow(1) and daylow(2) < daylow(0)) then {boxconvercon = 1;} } {d2convercnt = 0; d3convercnt = 0; d4convercnt = 0;} { if dayhigh(0) <= dayhigh(4) and daylow(0) >= daylow(4) then { {d4convercnt = d4convercnt + 1;} if dayhigh(1) <= dayhigh(4) and daylow(1) >= daylow(4) then {d4convercnt = d4convercnt + 1;} if dayhigh(2) <= dayhigh(4) and daylow(2) >= daylow(4) then {d4convercnt = d4convercnt + 1;} if dayhigh(3) <= dayhigh(4) and daylow(3) >= daylow(4) then {d4convercnt = d4convercnt + 1;} } if dayhigh(0) <= dayhigh(3) and daylow(0) >= daylow(3) then { {d3convercnt = d3convercnt + 1;} if dayhigh(1) <= dayhigh(3) and daylow(1) >= daylow(3) then {d3convercnt = d3convercnt + 1;} if dayhigh(2) <= dayhigh(3) and daylow(2) >= daylow(3) then {d3convercnt = d3convercnt + 1;} } if dayhigh(0) <= dayhigh(2) and daylow(0) >= daylow(2) then { {d2convercnt = d2convercnt + 1;} if dayhigh(1) <= dayhigh(2) and daylow(1) >= daylow(2) then {d2convercnt = d2convercnt + 1;} } } // ---------- ÀÌÆò¼±ÀÇ ±â¿ï±â°¡ ÀÏÁ¤¼öÁØÀÌÇÏÀÎÁö ÆÇ´Ü ---------- // {lp1234gapmincon = 0; lp123gapmincon = 0; lp234gapmincon = 0;} { if abs(avg((lp1 - lp1[1]), (lp2 - lp2[1]), (lp3 - lp3[1]), (lp4 - lp4[1]))) <= Flpdepmin and abs(lp1 - lp1[1]) <= abs(lp1[1] - lp1[2]) and abs(lp2 - lp2[1]) <= abs(lp2[1] - lp2[2]) and abs(lp3 - lp3[1]) <= abs(lp3[1] - lp3[2]) and abs(lp4 - lp4[1]) <= abs(lp4[1] - lp4[2]) then {lp1234gapmincon = 1;} if abs(avg((lp1 - lp1[1]), (lp2 - lp2[1]), (lp3 - lp3[1]))) <= Flpdepmin and abs(lp1 - lp1[1]) <= abs(lp1[1] - lp1[2]) and abs(lp2 - lp2[1]) <= abs(lp2[1] - lp2[2]) and abs(lp3 - lp3[1]) <= abs(lp3[1] - lp3[2]) then {lp123gapmincon = 1;} if abs(avg((lp2 - lp2[1]), (lp3 - lp3[1]), (lp4 - lp4[1]))) <= Flpdepmin and abs(lp2 - lp2[1]) <= abs(lp2[1] - lp2[2]) and abs(lp3 - lp3[1]) <= abs(lp3[1] - lp3[2]) and abs(lp4 - lp4[1]) <= abs(lp4[1] - lp4[2]) then {lp234gapmincon = 1;} } // 2007.5.2 ÀÛ¼º {barcount = 0; boxdep = 0; boxhigh = 0; boxlow = 0; boxmid = 0; contboxcnt = 0; baseboxhigh = 0; baseboxlow = 0; baseboxmid = 0; baseboxdep = 0;} { if d2boxdep <= depvaluemax and C <= d2boxhigh and C >= d2boxlow then contboxcnt = contboxcnt + 1; { if dayhigh(3) > dayhigh(2) then {boxhigh = dayhigh(3);} if dayhigh(3) <= dayhigh(2) then {boxhigh = dayhigh(2);} if daylow(3) < daylow(2) then {boxlow = daylow(3);} if daylow(3) >= daylow(2) then {boxlow = daylow(2);} boxdep = boxhigh - boxlow; boxmid = (boxhigh - boxlow) / 2; if boxdep <= Fdepvaluemax and d2boxhigh <= boxhigh and d2boxlow >= boxlow then contboxcnt = contboxcnt + 1; baseboxhigh = boxhigh; baseboxlow = boxlow; baseboxdep = boxdep; } } if C > dayhigh(1) then { if C > dayhigh(4) and C > dayhigh(3) and C > dayhigh(2) then {boxupcnt = 4;} else if C > dayhigh(3) and C > dayhigh(2) then {boxupcnt = 3;} else if C > dayhigh(2) then {boxupcnt = 2;} else {boxupcnt = 1;} } if C > dayhigh(1) + Faddbox then { if C > dayhigh(4) and C > dayhigh(3) and C > dayhigh(2) then {boxupbetcnt = 4;} else if C > dayhigh(3) and C > dayhigh(2) then {boxupbetcnt = 3;} else if C > dayhigh(2) then {boxupbetcnt = 2;} else {boxupbetcnt = 1;} } if C < daylow(1) then { if C < daylow(4) and C < daylow(3) and C < daylow(2) then {boxdowncnt = 4;} else if C < daylow(3) and C < daylow(2) then {boxdowncnt = 3;} else if C < daylow(2) then {boxdowncnt = 2;} else {boxdowncnt = 1;} } if C < daylow(1) - Faddbox then { if C < daylow(4) and C < daylow(3) and C < daylow(2) then {boxdownbetcnt = 4;} else if C < daylow(3) and C < daylow(2) then {boxdownbetcnt = 3;} else if C < daylow(2) then {boxdownbetcnt = 2;} else {boxdownbetcnt = 1;} } // ---------- °¸»ó½Â, °¸Ç϶ô ¿©ºÎ ÆÇ´Ü·çƾ ---------- // {upgapcon = 0; downgapcon = 0; contgapcnt = 0; upgapdaycnt = 0; downgapdaycnt = 0; upgaplow = 0; downgaphigh = 0;} { if daylow(0) > dayhigh(1) or daylow(1) > dayhigh(2) or daylow(2) > dayhigh(3) or daylow(3) > dayhigh(4) then {upgapcon = 1;}// ÃÖ±Ù 4ÀÏ À̳»¿¡ »ó½Â°¸ÀÌ ÀÖ¾ú´ÂÁö ¿©ºÎ if dayhigh(0) < daylow(1) or dayhigh(1) < daylow(2) or dayhigh(2) < daylow(3) or dayhigh(3) < daylow(4) then {downgapcon = 1;}// ÃÖ±Ù 4ÀÏ À̳»¿¡ Ç϶ô°¸ÀÌ ÀÖ¾ú´ÂÁö ¿©ºÎ } { if daylow(0) > dayhigh(1) and daylow(1) > dayhigh(2) and daylow(2) > dayhigh(3) then {contgapcnt = 3;}// ¿¬¼Ó »ó½Â°¸ÀÇ È½¼ö Ä«¿îÆ® else if daylow(0) > dayhigh(1) and daylow(1) > dayhigh(2) then {contgapcnt = 2;} else if daylow(0) > dayhigh(1) then {contgapcnt = 1;} } { if dayhigh(0) < daylow(1) and dayhigh(1) < daylow(2) and dayhigh(2) < daylow(3) then {contgapcnt = -3;}// ¿¬¼Ó Ç϶ô°¸ÀÇ È½¼ö Ä«¿îÆ® else if dayhigh(0) < daylow(1) and dayhigh(1) < daylow(2) then {contgapcnt = -2;} else if dayhigh(0) < daylow(1) then {contgapcnt = -1;} } { if daylow(0) > dayhigh(1) and daylow(0) > dayhigh(2) and daylow(0) > dayhigh(3) and daylow(0) > dayhigh(4) then {upgapdaycnt = 4;}// »ó½Â°¸ÀÇ »ó½ÂÀϼö Ä«¿îÆ® else if daylow(0) > dayhigh(1) and daylow(0) > dayhigh(2) and daylow(0) > dayhigh(3) then {upgapdaycnt = 3;} else if daylow(0) > dayhigh(1) and daylow(0) > dayhigh(2) then {upgapdaycnt = 2;} else if daylow(0) > dayhigh(1) then {upgapdaycnt = 1;} } { if dayhigh(0) < daylow(1) and dayhigh(0) < daylow(2) and dayhigh(0) < daylow(3) and dayhigh(0) < daylow(4) then {downgapdaycnt = -4;}// Ç϶ô°¸ÀÇ Ç϶ôÀϼö Ä«¿îÆ® else if dayhigh(0) < daylow(1) and dayhigh(0) < daylow(2) and dayhigh(0) < daylow(3) then {downgapdaycnt = -3;} else if dayhigh(0) < daylow(1) and dayhigh(0) < daylow(2) then {downgapdaycnt = -2;} else if dayhigh(0) < daylow(1) then {downgapdaycnt = -1;} } { if daylow(0) > dayhigh(1) then// ±ÝÀÏ °¸»ó½ÂÈÄ °¸ Ç϶ôµ¹ÆÄ ¸øÇÒ °æ¿ì {upgaplow = dayhigh(1);} else if daylow(1) > dayhigh(2) then// ÀüÀÏ °¸»ó½Â ÈÄ { if dayopen(0) > dayhigh(2) then// ±ÝÀÏÀÇ Àú°¡°¡ ÀüÀÏÀÇ °¸À» Ç϶ôµ¹ÆÄ ¸øÇÒ °æ¿ì {upgaplow = dayhigh(2);} } else if daylow(2) > dayhigh(3) then// ÀüÀüÀÏ °¸»ó½Â ÈÄ { if dayopen(0) > dayhigh(3) and daylow(1) > dayhigh(3) then// ±ÝÀÏ ¶Ç´Â ÀüÀÏÀÇ Àú°¡°¡ {upgaplow = dayhigh(3);} // ÀüÀüÀÏÀÇ °¸À» Ç϶ôµ¹ÆÄ ¸øÇÒ °æ¿ì } else if daylow(3) > dayhigh(4) then// ÀüÀüÀüÀÏ °¸»ó½Â ÈÄ { if dayopen(0) > dayhigh(4) and daylow(1) > dayhigh(4) and daylow(2) > dayhigh(4) then {upgaplow = dayhigh(4);} // ±ÝÀÏ, ÀüÀÏ, ÀüÀüÀÏÀÇ Àú°¡°¡ ÀüÀüÀüÀÏÀÇ °¸À» Ç϶ôµ¹ÆÄ ¸øÇÒ °æ¿ì } } { if dayhigh(0) < daylow(1) then// ±ÝÀÏ °¸Ç϶ôÈÄ °¸ »ó½Âµ¹ÆÄ ¸øÇÒ °æ¿ì {downgaphigh = daylow(1);} else if dayhigh(1) < daylow(2) then// ÀüÀÏ °¸Ç϶ô ÈÄ { if dayopen(0) < daylow(2) then// ±ÝÀÏÀÇ °í°¡°¡ ÀüÀÏÀÇ °¸À» »ó½Âµ¹ÆÄ ¸øÇÒ °æ¿ì {downgaphigh = daylow(2);} } else if dayhigh(2) < daylow(3) then// ÀüÀüÀÏ °¸Ç϶ô ÈÄ { if dayopen(0) < daylow(3) and dayhigh(1) < daylow(3) then// ±ÝÀÏ ¶Ç´Â ÀüÀÏÀÇ °í°¡°¡ {downgaphigh = daylow(3);} // ÀüÀüÀÏÀÇ °¸À» »ó½Âµ¹ÆÄ ¸øÇÒ °æ¿ì } else if dayhigh(3) < daylow(4) then// ÀüÀüÀüÀÏ °¸»ó½Â ÈÄ { if dayopen(0) < daylow(4) and dayhigh(1) < daylow(4) and dayhigh(2) < daylow(4) then {downgaphigh = daylow(4);} // ±ÝÀÏ, ÀüÀÏ, ÀüÀüÀÏÀÇ °í°¡°¡ ÀüÀüÀüÀÏÀÇ °¸À» »ó½Âµ¹ÆÄ ¸øÇÒ °æ¿ì } } // ---------- ¿¬¼Ó»ó½Â, ¿¬¼ÓÇ϶ô ¿©ºÎ ÆÇ´Ü·çƾ ---------- // {contupcnt = 0; contdowncnt = 0;} { if dayopen(2) < dayclose(2) and dayopen(1) < dayclose(1) and dayopen(0) < C and dayclose(3) < dayclose(2) and dayclose(2) < dayclose(1) and dayclose(1) < C then contupcnt = 3; else if dayopen(1) < dayclose(1) and dayopen(0) < C and dayclose(2) < dayclose(1) and dayclose(1) < C then contupcnt = 2; else if dayopen(0) < C and dayclose(1) < C then contupcnt = 1; if dayopen(2) > dayclose(2) and dayopen(1) > dayclose(1) and dayopen(0) > C and dayclose(3) > dayclose(2) and dayclose(2) > dayclose(1) and dayclose(1) > C then contdowncnt = 3; else if dayopen(1) > dayclose(1) and dayopen(0) > C and dayclose(2) > dayclose(1) and dayclose(1) > C then contdowncnt = 2; else if dayopen(0) > C and dayclose(1) > C then contdowncnt = 1; } // ---------- ºÀÆÄµ¿ÀÇ °­¾à¿¡ µû¸¥ °­Á¦ ¸Å¼ö, ¸Åµµ ÁøÀÔ¹× Ã»»ê ¿©ºÎ ÆÇ´Ü ·çƾ ---------- // entbartrend = 0;// ´Üµ¶À¸·Î ¸Å¼ö¹× ¸ÅµµÁ¦ÇÑ »ç¿ëÇØµµ È®·ü ³ôÀ½ //if dayindex() > 0 then { if lpshupresist < 2 and !(sto10k < sto10d and sto20k < sto20d) then { if C > O and C[1] > O[1] and V > V[1] and V[1] > V[2] and sto10k < stoh and upV >= 0.3 and upV1 >= 0.3 and bidask > 0 and bidask > bidask[1] and bidask[1] > bidask[2] then {entbartrend = 1;} } if lpshdownresist < 2 and !((sto10k > sto10d and sto20k > sto20d) and lp123n4convercon == 1 and !((C < lp2 and C < lp3 and C < lp4 and lp2 < lp2[1] and lp3 < lp3[1] and lp4 < lp4[1]))) and !(lp123n4convercon == 1 and C >= daylow(1) and sp > lp1) then if !(sto20k > sto20d and sto10dL1 < stoL and sto10k > sto10dL1 and !(lp < lp[1] and contgapcnt < 0)) then if !(lp1234dr > 0 or lp234dr > 0) or !(C >= daylow(1) - Faddbox or C >= daylow(0)[1] - Faddbox) or (V + V[1] > dayopenvol) then { if C < O and C[1] < O[1] and V > V[1] and V[1] > V[2] and sto10k > stoL and sto20k > stoL and ((downV >= 0.6 and downV1 >= Faddbox) or (downV >= 0.8 and downV1 >= 0.1) or ((downbidaskcon == 1 or C < daylow(0)[1]) and downV >= 0.3 and downV1 >= Faddbox)) and bidask < 0 and bidask < bidask[1] and sto65k > stoL and !(sto20k > sto20d and sto20up > 1) and !(sto10k > sto10d and sto10up > 1) then {entbartrend = -1;} } } {clbartrend = 0; clbartrend1 = 0;} if dayindex() > 0 and V > V[1] and V[1] > V[2] then { if bidask > 0 and bidask > bidask[1] and bidask[1] > bidask[2] then { if C > O and C[1] > O[1] and upV >= 0.3 and upV1 >= Faddbox then {clbartrend = 1;} if C > O and upV >= Faddbox and ((C[1] > O[1] and upV > upV1) or (C[1] <= O[1] and upV > downV1)) then {clbartrend1 = 1;} } if bidask < bidask[1] and bidask[1] < bidask[2] then { if C < O and C[1] < O[1] and ((downV >= 0.3 and downV1 >= Faddbox) or (downbidaskcon == 1 and downV >= Faddbox and downV1 >= Faddbox) or (bfdownbidaskcon == 1 and downV >= 0.5)) and sto65k > stoL then {clbartrend = -1;} if C < O and downV >= Faddbox and ((C[1] < O[1] and downV > downV1) or (C[1] >= O[1] and downV > upV1)) then {clbartrend1 = -1;} } } Crossdown520con = 0;//ÀåÀ½ºÀ ¼º¸³¿ä°ÇÁß Ã¹Â° { if C < O and C < L[1] and O >= sp and O >= lp and C < sp and C < lp and H - L > H[1] - L[1] then {Crossdown520con = 1;} } upfailure10con = 0; { if H < mp and C < lp and downV >= Faddbox then { if (lp < lp[1] or (dayopen(0) < daylow(1) and C < daylow(1))) and !(lp1234dr == 2 and upgapcon == 1 and C > lp2 and C >= upgaplow) and !(sto65k > sto65d and sto65k > sto65k[1]) then {upfailure10con = 1;} } } displp3con = 0; { if (Crossup(displp3,dispL) or (daylowdisplp3 < dispL and displp3 > dispL)) then {displp3con = 1;} if (Crossdown(displp3,disph) or (dayhighdisplp3 > disph and displp3 < disph)) then {displp3con = -1;} } simricon = 0; { if (Crossup(simri,31) or (daylowsimri <= 30 and simri > 30)) then {simricon = 1;} if (Crossdown(simri,69) or (dayhighsimri >= 70 and simri < 70)) then {simricon = -1;} } {sellcldownupcon = 0; buyclupdowncon = 0;} { if ( tupV >= 0.4 and ( downupV > abs(O - C) * 2 or (downupV >= 0.5 and downupV > abs(O - C)) or (downupV >= 0.5 and downupV > (O - L)*0.4 and V > V[1]) ) ) then {sellcldownupcon = 1;} if (C > O and H - C > (C - O)*2 and C - O <= Faddbox) then {buyclupdowncon = 1;} } contbidaskcnt = 0; { if bidask > bidask[1] and bidask[1] > bidask[2] then { if bidask[2] > bidask[3] then contbidaskcnt = 2; else contbidaskcnt = 1; } if bidask < bidask[1] and bidask[1] < bidask[2] then { if bidask[2] < bidask[3] then contbidaskcnt = -2; else contbidaskcnt = -1; } } contbarcnt = 0; { if C > O and C[1] > O[1] and C > C[1] and upV >= Faddbox then { if C[2] > O[2] and C[1] > C[2] then contbarcnt = 2; else contbarcnt = 1; } if C < O and C[1] < O[1] and C < C[1] and downV >= Faddbox then { if C[2] < O[2] and C[1] < C[2] then contbarcnt = -2; else contbarcnt = -1; } } contvolcnt = 0; { if V > V[1] and V[1] > V[2] then { if V[2] > V[3] then contvolcnt = 2; else contvolcnt = 1; } } // ---------- »ó½Â¹× Ç϶ô½Ã ÃÖ¼Ò¹èÆÃ(¶Ç´Â 5ºÐºÀ Æ÷Áö¼Ç±âÁØ) °Å·¡ÁøÀÔ °¡´É¿©ºÎ °áÁ¤ ·çƾ ---------- // {buymincon = 0; sellmincon = 0;} { if ((boxupcnt == 0 and boxdowncnt == 0 and C > yboxmid + Faddbox and C > tboxmid + Faddbox) or (boxupcnt > 0 and ((lp1 > lp1[1] and C < lp1) or (lp1 <= lp1[1] and sp < lp1)))) and (!(lp0123dr < 0 or lp1234dr < 0) or sto65k > sto65d) then// sto65k > sto65d»èÁ¦½Ã ¼öÀͰ¨¼Ò {buymincon = 1;}// ÇöÀç°¡°¡ ÀüÀÏÀÇ ÃÖ°í°¡ ¹ØÀ̰í ÀüÀϰú ±ÝÀÏÀÇ Áß°£°¡º¸´Ù ³ô°Å³ª // 60ÀÌÆò¼±ÀÌ »óÇâÀ̸é ÇöÀç°¡°¡ 60ÀÌÆò¼±º¸´Ù Å©Áö ¾Ê°Å³ª // 60ÀÌÆò¼±ÀÌ ÇÏÇâÀ̸é 5ÀÌÆò¼±ÀÌ 60ÀÌÆò¼±À§¿¡ ÀÖÁö ¾ÊÀ¸¸é 5ºÐºÀ °Å·¡ ´ë»óÀÓ if ((boxdowncnt == 0 and boxupcnt == 0 and C < yboxmid - Faddbox and C < tboxmid - Faddbox) or (boxdowncnt > 0 and ((lp1 < lp1[1] and C > lp1) or (lp1 >= lp1[1] and sp > lp1)))) and (!(lp0123dr > 0 or lp1234dr > 0) or sto65k < sto65d) then// sto65k < sto65d»èÁ¦½Ã ¼öÀͰ¨¼Ò {sellmincon = 1;}// ÇöÀç°¡°¡ ÀüÀÏÀÇ ÃÖÀú°¡ À§À̰í ÀüÀϰú ±ÝÀÏÀÇ Áß°£°¡º¸´Ù ³·°Å³ª // 60ÀÌÆò¼±ÀÌ ÇÏÇâÀ̸é ÇöÀç°¡°¡ 60ÀÌÆò¼±º¸´Ù ÀÛÁö ¾Ê°Å³ª // 60ÀÌÆò¼±ÀÌ »óÇâÀ̸é 5ÀÌÆò¼±ÀÌ 60ÀÌÆò¼± ¹Ø¿¡ ÀÖÁö ¾ÊÀ¸¸é 5ºÐºÀ °Å·¡ ´ë»óÀÓ } // ---------- ¸Å¼ö½Ã Áß°£ ¶Ç´Â ÃÖ´ë¹èÆÃ Æ÷Áö¼Ç ÁøÀÔ Á¶°Ç ÆÇ´Ü ---------- // buyregcon = 0; if C > O and upV >= Faddbox and sp > sp[1] then if lp0123dr > 0 or spnlp1234con > 0 or uplongtrend > 0 or boxupbetcnt > 0 or sto65up1 == 2 or sto130up1 == 2 or upbidaskcon == 1 or entbartrend == 1 then { if (lp0123dr > 0 or uplongtrend > 0) and C >= yboxmid + Faddbox and C >= tboxmid + Faddbox then {buyregcon = 1;}// 5-20-60-(120 or 360)¼± Á¤¹è¿­ ¶Ç´Â 20-60-120-360¼± Á¤¹è¿­½Ã if lp1dupcon > 0 then {buyregcon = 2;}// ÀϺÀ 5Àϼ± ½Ö¹Ù´ÚÀ§ 5ÀÌÆò¼± »óÇâ if lp1 > lp1[1] and lp1[1] > lp1[2] and sto65up1 == 2 then {buyregcon = 3;}// 07. 7.3 ÀÛ¼º if ( ((sto65up == 2 or sto130up == 2 or (spmpnlpdupcon > 0 and mplpnlp12dupcon > 0)) and sp > lp1) or spnlp1234con > 0 or (lp0123dr > 0 and !(sp < lp2 and lp2 < lp2[1]) and !(sp < lp3 and lp3 < lp3[1])) ) and boxupcnt > 0 then {buyregcon = 4;} if borbfupbidaskcon == 1 then { if sto65k > sto65d and V > V[1] and dayindex() > 0 and boxupcnt > 0 then {buyregcon = 11;} } if entbartrend == 1 and (C > lp1 or C > dayhigh(0)[1]) and sto65k > sto65d and boxupcnt > 1 then {buyregcon = 21;} if contgapcnt > 0 and C > d4boxhigh then {buyregcon = 31;} if contgapcnt > 0 and C > d2boxhigh and C > lp1 and ( downlongtrend == 0 or (C > dayclose(1) * 1.02 and upV > depvaluemin / 2)) then {buyregcon = 41;} if (C > dayhigh(0)[1] + 0.4 and upV > depvaluemin and C > daylow(0) * 1.04 and entbartrend == 1 and dayindex() < 10) then {buyregcon = 51;} if (C > d4boxhigh + Faddbox and C > lp1 + Faddbox and C > lp2 and C > lp3) then {buyregcon = 61;}// 08.12.11 ÀÛ¼º } buybetcon = 0; if C > O and upV >= Faddbox and sp > sp[1] then if lp0123dr > 1 or uplongtrend > 0 or boxupbetcnt > 1 or sto65up1 == 2 or sto130up1 == 2 or entbartrend == 1 or (upbidaskcon == 1 and lpshupresist < 2) then { if (lp0123dr > 1 or uplongtrend > 0) and C >= yboxmid + Faddbox and C >= tboxmid + Faddbox then {buybetcon = 1;}// 5-20-60-(120 or 360)¼± Á¤¹è¿­ ¶Ç´Â 20-60-120-360¼± Á¤¹è¿­½Ã if lp1dupcon > 0 then {buybetcon = 2;}// ÀϺÀ 5Àϼ± ½Ö¹Ù´ÚÀ§ 5ÀÌÆò¼± »óÇâ if lp1 > lp1[1] and lp1[1] > lp1[2] and sto65up1 == 2 then {buybetcon = 3;}// 07. 7.3 ÀÛ¼º if ( ((sto65up == 2 and sto65index + 30 >= index) or (sto65kL1 > sto65kL2 and sto65k > sto65d) and sp > lp1 )// ÀϺÀ ½ºÅä5 ½Ö¹Ù´Ú or ((sto130up == 2 and sto130index + 30 >= index) or (sto130kL1 > sto130kL2 and sto130k > sto130d) and sp > lp1)// ÀϺÀ ½ºÅä10 ½Ö¹Ù´Ú or (lp0123dr > 0 and !(sp < lp2 and lp2 < lp2[1]) and !(sp < lp3 and lp3 < lp3[1]))) and boxupbetcnt > 1 and ((dayindex() > 0 and V > V[1]) or bgstvolcon == 1) then {buybetcon = 4;} if borbfupbidaskcon == 1 then { if sto65k > sto65d and ((dayindex() > 0 and V > V[1]) or bgstvolcon == 1) and boxupbetcnt > 0 then {buybetcon = 11;} } if entbartrend == 1 and (C > lp1 or C > dayhigh(0)[1]) and sto65k > sto65d and boxupcnt > 1 then {buybetcon = 21;} if contgapcnt > 0 and C > d4boxhigh then {buybetcon = 31;} if contgapcnt > 0 and C > d2boxhigh and C > lp1 and (downlongtrend == 0 or (C > dayclose(1) * 1.02 and upV > depvaluemin / 2)) then {buybetcon = 41;} if (C > dayhigh(0)[1] + 0.4 and upV > depvaluemin and C > daylow(0) * 1.04 and entbartrend == 1 and dayindex() < 10) then {buybetcon = 51;} if (C > d4boxhigh + Faddbox and C > lp1 + Faddbox and C > lp2 and C > lp3) then {buybetcon = 61;}// 08.12.11 ÀÛ¼º } // ---------- ¸Åµµ½Ã Áß°£ ¶Ç´Â ÃÖ´ë¹èÆÃ Æ÷Áö¼Ç ÁøÀÔ Á¶°Ç ÆÇ´Ü ---------- // sellregcon = 0; if C < O and downV >= 0.15 and sp < sp[1] then if lp0123dr < 0 or spnlp1234con < 0 or downlongtrend > 0 or boxdownbetcnt > 0 or sto65down1 == 2 or sto130down1 == 2 or downbidaskcon == 1 or entbartrend == -1 then { if (lp0123dr < -1 or downlongtrend > 0) then { if C <= yboxmid -Faddbox and C <= tboxmid - Faddbox then {sellregcon = 1;}// 5-20-60-(120 or 360)¼± ¿ª¹è¿­ ¶Ç´Â 20-60-120-360¼± ¿ª¹è¿­½Ã if (entbartrend == -1 or clbartrend == -1) and (downV > depvaluemin or tboxdep > depvaluemin1) then {sellregcon = 2;} } if boxdownbetcnt > 1 then {sellregcon = 11;}// ÀÌÀü 3Àϰ£ÀÇ ¹Ú½º±Ç ÇÏÇâÅ»Ãâ½Ã if lp1dupcon < 0 then {sellregcon = 12;}// ÀϺÀ 5Àϼ± ½ÖºÀ¹Ø 5ÀÌÆò¼± ÇÏÇâ if lp1 < lp1[1] and lp1[1] < lp1[2] and sto65down1 == 2 then {sellregcon = 13;}// 07. 7.3 ÀÛ¼º if ( ((sto65down == 2 or sto130down == 2 or (spmpnlpdupcon < 0 and mplpnlp12dupcon < 0)) and C < lp1) or (lp0123dr < 0 and !(sp > lp2 and lp2 > lp2[1]) and !(sp > lp2 and lp2 > lp2[1])) ) and boxdownbetcnt > 0 then {sellregcon = 14;} if borbfdownbidaskcon == 1 then { if sto65k < sto65d and V > V[1] and boxdowncnt > 0 then {sellregcon = 21;} if C < lp1 - Faddbox and bgstvolcon == 1 and bgstdownVcon == 1 and downV > depvaluemin1 then {sellregcon = 22;} } if entbartrend == -1 and (C < lp1 or C < daylow(0)[1]) and sto65k < sto65d and boxdowncnt > 1 then {sellregcon = 31;} if entbartrend == -1 then { if (borbfdownbidaskcon == 1) and bgstdownVcon == 1 then {sellregcon = 41;} } if contgapcnt < 0 and C < d2boxlow and C < lp1 and ( uplongtrend < 1 or (C < dayclose(1) * 0.98 and downV > depvaluemin / 2)) then {sellregcon = 51;} if (C < daylow(0)[1] - 0.4 and downV > depvaluemin and C < dayhigh(0) * 0.96 and entbartrend == -1 and dayindex() < 10) then {sellregcon = 61;} if (lp1234dr == -2 and downV > depvaluemid and C < mp and C < lp2 and sto130k < stoL and displp3 < dispL) then {sellregcon = 62;} } sellbetcon = 0; if C < O and downV >= 0.15 and sp < sp[1] then if lp0123dr < -1 or downlongtrend > 0 or boxdownbetcnt > 1 or sto65down1 == 2 or sto130down1 == 2 or entbartrend == -1 or (downbidaskcon == 1 and lpshdownresist < 2) then { if (lp0123dr < -1 or downlongtrend > 0) then { if C <= yboxmid - Faddbox and C <= tboxmid - Faddbox then {sellbetcon = 1;}// 5-20-60-(120 or 360)¼± ¿ª¹è¿­ ¶Ç´Â 20-60-120-360¼± ¿ª¹è¿­½Ã if (entbartrend == -1 or clbartrend == -1) and (downV > depvaluemin or tboxdep > depvaluemin1) then {sellbetcon = 2;} } if C < d3boxlow - Faddbox then {sellbetcon = 11;}// ÀÌÀü 3Àϰ£ÀÇ ¹Ú½º±Ç ÇÏÇâÅ»Ãâ½Ã if lp1dupcon < 0 then {sellbetcon = 12;}// ÀϺÀ 5Àϼ± ½ÖºÀ¹Ø 5ÀÌÆò¼± ÇÏÇâ if lp1 < lp1[1] and lp1[1] < lp1[2] and sto65down1 == 2 then {sellbetcon = 13;}// 07. 7.3 ÀÛ¼º if ( (sto65down == 2 or (sto65kL1 < sto65kL2 and sto65k < sto65d) and C < lp1 )// ÀϺÀ ½ºÅä5 ½Ö¹Ù´Ú or (sto130down == 2 or (sto130kL1 < sto130kL2 and sto130k < sto130d) and C < lp1)// ÀϺÀ ½ºÅä10 ½Ö¹Ù´Ú or (lp0123dr < 0 and !(sp > lp2 and lp2 > lp2[1]) and !(sp > lp3 and lp3 > lp3[1]))) and (boxdownbetcnt > 1 or (boxdownbetcnt > 0 and (entbartrend < 0 or ((sto65down == 2 or sto130down == 2) and bgstvolcon == 1 and bgstdownVcon == 1)))) then {sellbetcon = 14;} if borbfdownbidaskcon == 1 then { if sto65k < sto65d and V > V[1] and boxdownbetcnt > 1 and (C < lp1 or C < daylow(0)[1]) then {sellbetcon = 21;} if C < lp1 - Faddbox and bgstvolcon == 1 and bgstdownVcon == 1 and downV > depvaluemin1 then {sellbetcon = 22;} } if entbartrend == -1 and (C < lp1 or C < daylow(0)[1]) and sto65k < sto65d and boxdowncnt > 1 then {sellbetcon = 31;} if entbartrend == -1 then { if (borbfdownbidaskcon == 1) and bgstdownVcon == 1 then {sellbetcon = 41;} } if contgapcnt < 0 and C < d2boxlow and C < lp1 and (uplongtrend == 0 or (C < dayclose(1) * 0.98 and downV > depvaluemin / 2)) then {sellbetcon = 51;} if (C < daylow(0)[1] - 0.4 and downV > depvaluemin and C < dayhigh(0) * 0.96 and entbartrend == -1 and dayindex() < 10) then {sellbetcon = 61;} if (lp1234dr == -2 and downV > depvaluemid and C < mp and C < lp2 and sto130k < stoL and displp3 < dispL) then {sellbetcon = 62;} } // ---------- °Å·¡±ÝÁö Á¶°Ç ÆÇ´Ü(½Å±Ô ¸Å¼öÁøÀÔ ±ÝÁö Á¶°Ç) ---------- // notbuycon = 0; if !(C > dayhigh(0)[1] + 0.4 and upV > depvaluemin and C > daylow(0) * 1.04 and entbartrend == 1 and dayindex() < 10) then { if (sp < lp1 and mp < mp[1]) then {notbuycon = 01;} if !((C[1] <= O[1] and (C > H[1] or (sto65up == 2 and V > V[1])) and upV >= Faddbox) or (C[1] > O[1] and C > C[1])) then {notbuycon = 02;} if !(boxupcnt > 0 or (buymincon > 0 and upV >= Faddbox) or entbartrend == 1 or upbidaskcon == 1 or (sp > lp1 and (sto65up == 2 or sto130up == 2) and (C > dayhigh(1) + Faddbox or C > dayhigh(0)[1] + Faddbox))) then {notbuycon = 03;} if !(sto10k > sto10k[1] and (sto10k > sto10d or (dayindex() == 0 and C > dayclose(1)) or (mp > mp[1] and V > V[1]))) then {notbuycon = 04;} if !(sto20k > sto20d or lp > lp[1]) then {notbuycon = 05;} if !(lp0123dr > 1 or uplongtrend > 0) and !(sto20k < stoh or (downgapcon == 1 and C > downgaphigh) or boxupcnt > 1) then {notbuycon = 06;} if upV * 2 < updownV and updownV >= 0.5 and !(C > daylow(1) or C > daylow(0)[1]) then {notbuycon = 07;} if C <= dayhigh(1) and C <= dayhigh(2) and stodh10n20downcon == 1 and !(uplongtrend > 0 or lp0123dr > 1 or upV > depvaluemin / 2 or sto65up == 2 or sto130up == 2 or borbfupbidaskcon == 1) then {notbuycon = 08;} if !(downbidaskcon == 0 or dayindex() == 0) or (contbidaskcnt < 0 and bidask < 0) then {notbuycon = 22;} if !(daylow(0) > dayhigh(1) or (bidask > 0 and bidask > bidask[1]) or (boxupcnt > 1 or (boxupcnt > 0 and lp0123dr > 1 and C > dayhigh(0)[1])) or (dayindex() == 0 and (bidask > 0 or C > dayhigh(1)))) and !(lp1234dr > 0 and lp2 > lp4 and C > d4boxmid and C > d3boxmid and C > lp1 and spmpnlpdupcon == 1 and lp > lp1) and !(downlongtrend == 0 and C > yboxmid and (bgstvolcon == 1 or bgstupVcon == 1) and upV > depvaluemin and C > lp1 and (sto10up > 1 or sto20up > 1) and (sto65up == 2 or sto130up == 2)) and !(uplongtrend > 0 and (bgstvolcon == 1 or bgstupVcon == 1) and (sto10up > 1 or sto20up > 1) and C > lp1) then {notbuycon = 23;} if !(splp01dr > 0 or lp0123dr > 0 or uplongtrend > 0 or boxupcnt > 0 or yboxdep > Fdepvaluemid) then {notbuycon = 24;}// 2007.5.1 ¼öÁ¤(¹Ú½º±ÇÅ©±â 5 --> 3À¸·Î ¼öÁ¤, ¹Ú½º±Ç¿¡¼­ ¼öÀÍ Áõ°¡) if boxupcnt == 0 and !(C > yboxmid + Faddbox and C > tboxmid + Faddbox) then {notbuycon = 25;} if displp3 > disph and sto65k > stoh and sto10dh1 > sto10d and sto10up < 2 and lp1234dr < 2 and !(upgapdaycnt > 3 and C > d4boxhigh + depvaluemin and upV >= Faddbox) and !(lp1234dr > 0 and lp0123dr > 1 and C > yboxmid and C[1] > O[1] and upV > depvaluemin / 2 and (borbfupbidaskcon == 1 or entbartrend == 1)) then {notbuycon = 26;} if displp3 > disph and sto65k > stoh and sto20k > stoh and sto10k > stoh and (lp1234dr < 1 or dayindex() == 11 or (lp1234dr == 1 and (C > lp4 and (lp > lp4 or lp4 > lp4[1])))) then {notbuycon = 28;} if (displp3 > disph or sto65k > stoh) and sto20k < sto20dh1 and sto10up < 2 and boxupcnt < 2 and !(lp1234dr > 0 and lp0123dr > 1 and C > yboxmid and C[1] > O[1] and upV > depvaluemin / 2 and (borbfupbidaskcon == 1 or entbartrend == 1)) then {notbuycon = 29;}// Ç϶ô¿¡ µ¿ÀÏ ±âÁØ Àû¿ë½Ã ¼Õ½Ç¹ß»ý if sto65k > stoh and sto65k < sto65d and boxupcnt < 1 then {notbuycon = 30;} if (sto10down > 1 or sto20down > 1) then {notbuycon = 31;} if sto10k < sto10d and (sto10k < sto10dL1 or sto20k < sto20dL1) then {notbuycon = 32;} if !((lp0123dr > 0 or lp023dr > 0 or lp1234dr > 0 or (lp134dr > 0 and lp1 > lp2)) and (lp1 > lp3 or lp1 > lp4 or (C > lp3 and C > lp4))) and sto20dh1 > stoh and sto20k < sto20dh1 and sto20up < 2 and !(bgstvolcon == 1 and bgstupVcon == 1 and C > d4boxhigh + Faddbox) then {notbuycon = 33;}// 2007.5.1 ¼öÁ¤(Ãß¼¼½Ã ¼öÀͰ¨¼ÒºÎ¹® ¼öÁ¤¿ä¸Á) if sto20k > stoh and yboxdep < Fdepvaluemid and tboxdep < Fdepvaluemid and boxupcnt < 1 and C <= dayhigh(0)[1] then {notbuycon = 34;} if lp > lp[1] and sto20k < sto20dh1 and !(lp[1] > lp[2] or (sto65k > sto65d and (contbidaskcnt > 0 or lp1234dr > 0))) and ((lp1234dr < 1 and bfdaydownlpcnt > 7 and C <= d2boxhigh + Faddbox) or C <= d2boxhigh) and !(lp1234dr > 0 and lp2 > lp4 and C > d4boxmid and C > d3boxmid and C > lp1 and spmpnlpdupcon == 1 and lp > lp1) then {notbuycon = 35;} if !(splp01dr > 0 or lp0123dr > 0 or uplongtrend > 0 or boxupcnt > 0) and bidask < bidask[1] and bidask < 0 then {notbuycon = 36;} if C <= d2boxhigh and upV < d2boxdep / 2 and yboxdep <= Fdepvaluemid and upV < yboxdep / 2 and C <= dayhigh(1) + Faddbox and sto65k < sto65d and sto65up <> 2 and (sto10k < sto10dh1 and sto20k < sto20dh1) then {notbuycon = 37;} if d4boxdep <= Fd4depvaluemax and dayhigh(0) <= d4boxhigh and daylow(0) >= d4boxlow and !(uplongtrend > 0 or (contgapcnt > 0 and daylow(0) >= dayhigh(1) + 0.5) or (sp > lp1 and (sto10up1 > 1 or sto20up1 > 1 or sto65up == 2 or sto130up == 2 or Cnlp1234con > 0 or spnlp1234con > 0)) or (spmpnlpdupcon == 1 and contbidaskcnt > 0 and (((sto65up == 2 or sto130up == 2) and displp3 > dispL)) or (sto65k > sto65d and sto65dL1 < 21) or (sto65k[1] < stoL and sto65d > sto65dL1)) ) and !(downgapcon == 1 and C > downgaphigh and C > dayhigh(0)[1]) and !(downlongtrend == 0 and C > yboxmid and (bgstvolcon == 1 or bgstupVcon == 1) and upV > depvaluemin and C > lp1 and (sto10up > 1 or sto20up > 1) and (sto65up == 2 or sto130up == 2)) and !(C > d2boxhigh and C > lp1 and (borbfupbidaskcon == 1 or entbartrend == 1)) then {notbuycon = 38;} if dayindex() > 3 and tboxdep <= Fdepvaluemin2 and C <= dayhigh(0)[1] and (sto10d < sto10dh1 and sto20d < sto20dh1) and (sto10k > stoh or sto20k > stoh) then {notbuycon = 39;}// 07.5.28ÀÛ¼º-¸ÅµµºÐ¿¡µµ Àû¿ëÈÄ Å×½ºÆ®¿ä¸Á if !(C > lp1 + Faddbox and (C[1] > lp1[1] + Faddbox or upV >= Faddbox)) and !( ((stodL10n20Lcon == 1 or sto10up1 > 1 or sto20up1 > 1) and bgstvolcon == 1 and bgstupVcon == 1) or ( spmpnlpdupcon == 1 and contbidaskcnt > 0 and ( ((sto65up == 2 or sto130up == 2) and displp3 > dispL) or (sto65k > sto65d and sto65dL1 < 21) or (sto65k[1] < stoL and sto65d > sto65dL1) ) ) ) then {notbuycon = 40;} if lp1 < lp1[1] and !(lp0123dr > 0 or uplongtrend > 0) and sto10k > stoh and sto20k > stoh and !(upV > daybgstdownV and upV > daybgstupV and upbidaskcon == 1) and !(C > d2boxhigh and C > lp1 and (borbfupbidaskcon == 1 or entbartrend == 1)) then {notbuycon = 41;} if dayindex() > 1 and !(lp0123dr > 1 or lp1234dr > 0) and downgapcon == 1 and dayhigh(0) > downgaphigh - 1 and C <= downgaphigh and !(V > V[1]) then// »ó½Â°¸ÀúÇ׽à {notbuycon = 42;} if lpcrupresist > 1 and (boxcrupresist > 1 or boxshupresist > 1 or lp123convercon == 1) then {notbuycon = 43;} if boxconvercon == 1 and lpshupresist > 0 and upV < 0.5 then {notbuycon = 44;}//¼ö·ÅÇüÀ̸鼭 ÀÌÆò¼± ÀúÇ׽à if lp1234dr < 2 and d2boxdep < depvaluemid1 and C < d2boxhigh + Faddbox and sto65k < sto65d and (stok10n20hcon == 1 or stodh10or20hcon == 1) and !(uplongtrend > 0 and ((sto10up > 1 and sto20up > 1 and bgstvolcon == 1) or (splpdupcon == 1 and splp1dupcon == 1))) then {notbuycon = 45;} if dayindex() > 2 and tboxdep < Fdepvaluemin and C < dayhigh(0)[1] and boxshupresist > 1 and box7shupresist > 2 then {notbuycon = 46;} if (!(lp0123dr > 0 or uplongtrend > 0) or (boxcrupresist > 0 or boxshupresist > 0 or lpshupresist > 0)) and sto20k[1] > stoh and sto10k < sto10dh1 and sto10dh1 > stoh and sto10k < stoh and !(sto65up == 2 or sto65up1 == 2) then {notbuycon = 47;} if dayindex() > 3 and contgapcnt < 1 and (boxcrupresist > 0 or boxshupresist > 0) and bfdaydownlpcnt > 7 and daydownlpcnt > dayindex() - 2 then {notbuycon = 48;} if !((sp > sp[1] and sp[1] > sp[2]) or uphb5con > 0 or upV > daybgstdownV or V > dayopenvol or V[1] > dayopenvol or entbartrend == 1 or ((borbfupbidaskcon == 1) and V > V[1])) then {notbuycon = 49;} if dayindex() == 0 and !(upgapdaycnt > 3 and C > d4boxhigh + depvaluemin and upV >= Faddbox) then { if sto65k > stoh and !(upV > bfdaybgstdownV and upV > bfdaybgstupV) then {notbuycon = 50;} if !(splp01dr > 0 or lp0123dr > 0 or uplongtrend > 0) and ((boxupcnt > 0 and upV < 0.3) or (sto65up == 2 and upV <= 1)) then {notbuycon = 51;}// ¹Ý´ë·Î Ç϶ô¿¡ Àû¿ë½Ã ¼öÀÍ·ü °¨¼Ò if sto10k > stoh and sto20k > stoh and sto10d < sto10dh1 and sto20d < sto20dh1 then {notbuycon = 52;}// 07.5.28ÀÛ¼º-¸ÅµµºÐ¿¡µµ Àû¿ëÈÄ Å×½ºÆ®¿ä¸Á if C > dayhigh(1) and upV < 1 and updownV > upV * 2 then {notbuycon = 53;} if downlongtrend > 0 and (boxshupresist > 0 or box7shupresist > 0) and stodh10or20downcon == 1 and !(contbidaskcnt > 1 or (bidask > 0 and (bidask > bidask[1] or (dayclose(1) > daylow(1) * 1.02)))) then {notbuycon = 54;} } if sto20k < sto20d and !(entbartrend > 0 or (C > dayhigh(1) and bgstupVcon == 1 and bgstvolcon == 1) or (upbidaskcon == 1 and C > dayhigh(1) and (bgstupVcon == 1 or bgstvolcon == 1)) or (dayindex() > 0 and V > V[1] and upV > daybgstdownV)) and !(downlongtrend == 0 and C > yboxmid and (bgstvolcon == 1 or bgstupVcon == 1) and upV > depvaluemin and C > lp1 and (sto10up > 1 or sto20up > 1) and (sto65up == 2 or sto130up == 2)) and !(contgapcnt > 0 and C > d4boxhigh) and !(lp1234dr > 0 and lp0123dr > 1 and C > yboxmid and C[1] > O[1] and upV > depvaluemin / 2 and (borbfupbidaskcon == 1 or entbartrend == 1)) then { if !(lp0123dr > 1 or uplongtrend > 0 or lp[1] > lp[2] or boxupcnt > 1) or ((lp0123dr < -1 or downlongtrend > 0) and contgapcnt < 1) then {notbuycon = 61;} if (displp3 > disph or sto65k > stoh) then {notbuycon = 62;}// Ç϶ô¿¡ µ¿ÀÏ ±âÁØ Àû¿ë½Ã ¼Õ½Ç¹ß»ý if sto10k < sto10dh1 and sto10up < 2 then {notbuycon = 63;} } if stodh10or20hcon == 1 and !(upgapdaycnt > 3 and C > d4boxhigh + depvaluemin and upV >= Faddbox) then { if boxupcnt == 0 and (lp <= lp[1] or lp[1] < lp[2]) and !((sto10up > 1 or sto20up > 1) or (lp1234dr > 0 and sp > lp1 and lp > lp1 and bgstupVcon == 1)) then {notbuycon = 71;} if sto65k > stoh and ((dayindex() == 0 and (displp3 > disph or simri > simh or V < bfdaybgstvol)) or (dayindex() > 0 and !((C >= d4boxhigh + Faddbox or bgstupVcon == 1 or entbartrend == 1) and C >= dayhigh(0)[1] + Faddbox))) then {notbuycon = 72;} if stodh10n20downcon == 1 and !(entbartrend == 1 or bgstvolcon == 1 or bgstupVcon == 1 or sto10up > 1 or sto20up > 1 or contgapcnt > 0) then {notbuycon = 73;} } if daybuyclcon == 1 then { if lpshupresist > 0 then {notbuycon = 81;} if boxshupresist > 0 then {notbuycon = 82;} if C <= dayhigh(0)[1] or C <= dayhigh(1) then {notbuycon = 83;} if !(bgstvolcon == 1 or bgstupVcon == 1 or entbartrend > 0) then {notbuycon = 84;} if uplongtrend == 0 and stok10n20hcon == 1 and (lp123convercon == 1 or lp1234convercon == 1) and box7shupresist > 0 then {notbuycon = 85;} } if sto65k < sto65d and lp1 < lp1[1] and sp < lp1 then { if downgapcon == 1 and C < downgaphigh and !(lp0123dr > 0 or uplongtrend > 0) and !(entbartrend == 1 or upbidaskcon == 1 or bgstvolcon == 1 or bgstupVcon == 1) then {notbuycon = 91;} if lpshupresist > 1 and !(lp0123dr > 0 or uplongtrend > 0) and !(C > d2boxhigh and C > lp1 and (borbfupbidaskcon == 1 or entbartrend == 1)) then {notbuycon = 92;} if lpshupresist > 0 and lp123n4convercon == 1 and !( ( ((sto65d > sto65dL1 and sto65dL1 < stoL) or (sto130d > sto130dL1 and sto130dL1 < stoL)) and (sto10up > 1 or sto20up > 1) ) or (bgstvolcon == 1 and bgstupVcon == 1 and stodL10n20Lcon == 1)) then {notbuycon = 93;} } if ((lp1 < lp1[1] and lp1crupresist == 1) and (lp2 < lp2[1] and lp2crupresist == 1)) or ((lp3 < lp3[1] and lp3crupresist == 1) and (lp4 < lp4[1] and lp4crupresist == 1)) or ((lp1 < lp1[1] and lp1crupresist == 1) and (lp3 < lp3[1] and lp3crupresist == 1)) or ((lp2 < lp2[1] and lp2crupresist == 1) and (lp4 < lp4[1] and lp4crupresist == 1)) or ((lp1 < lp1[1] and lp1crupresist == 1) and (lp4 < lp4[1] and lp4crupresist == 1)) or ((lp2 < lp2[1] and lp2crupresist == 1) and (lp3 < lp3[1] and lp3crupresist == 1)) then {notbuycon = 101;} if (C <= dayhigh(0)[1] or C <= dayhigh(1)) and sto65k > stoh and !((lp0123dr > 1 or uplongtrend > 0) and C > dayhigh(0)[1] and spmpnlpdupcon == 1) and !(lp1234dr > 0 and ((dayindex() == 0 and C > dayclose(1) + Faddbox) or C > dayhigh(0)[1]) and splp1dupcon == 1 and mplp1dupcon == 1 and lplp1dupcon == 1) then {notbuycon = 102;} if C <= dayhigh(1) then { if d3boxdep <= Fdepvaluemid and C <= d3boxhigh and !(V > V[1] and upV > daybgstdownV and upV > daybgstupV) then {notbuycon = 111;}// 07.5.28ÀÛ¼º if lp1 < lp2 and lp2 < lp3 and lp3 < lp4 and lp2 < lp2[1] and lp3 < lp3[1] and upV <= 0.3 and C < lp2 and sto20up <> 2 and sto65up <> 2 then {notbuycon = 112;} if stodh10n20hcon == 1 and !(entbartrend > 0 or (upV > upV1 and upV > downV1) or ((lp0123dr > 1 or uplongtrend > 0) and C > dayhigh(0)[1] and spmpnlpdupcon == 1)) then {notbuycon = 113;} if !(lp0123dr > 0 or uplongtrend > 0) and !(sp > lp1 or lp1 > lp1[1]) and !(C > lp1 and V > V[1] and upV > daybgstdownV and upV > daybgstupV and upV > bfdaybgstdownV and upV > bfdaybgstupV) then {notbuycon = 114;} } if C <= dayhigh(0)[1] then { if bidask < 0 and bidask < bidask[1] then {notbuycon = 121;} if (C <= dayhigh(1) or (bar6high + bar6low) / 2 <= dayhigh(1)) and !(bgstvolcon == 1 or bgstupVcon == 1 or entbartrend == 1 or borbfupbidaskcon == 1 or sto65up == 2 or sto130up == 2 or (spmpnlpdupcon == 1 and contbidaskcnt > 0 and (((sto65up == 2 or sto130up == 2) and displp3 > dispL)) or (sto65k > sto65d and sto65dL1 < 21) or (sto65k[1] < stoL and sto65d > sto65dL1))) and (sto10down1 == 2 or sto20down1 == 2 or sto10down2 == 2 or sto20down2 == 2 or stodh10or20downcon == 1) and !(lp1234dr > 0 and lp2 > lp4 and C > d4boxmid and C > d3boxmid and C > lp1 and spmpnlpdupcon == 1 and lp > lp1) then {notbuycon = 122;} if !(lp0123dr > 0 or lp1234dr > 0) and tboxdep <= depvaluemin1 and tboxmid - yboxmid < depvaluemin and (boxshupresist > 1 or box7shupresist > 1) and !(C > yboxmid and (bgstvolcon == 1 or bgstupVcon == 1) and upV > depvaluemin and C > lp1 and (sto65up == 2 or sto130up == 2) and (sto10up > 1 or sto20up > 1)) then {notbuycon = 123;} if tboxdep <= depvaluemin and bfdaydownlpcnt > 7 and !(bgstvolcon == 1 and bgstupVcon == 1) and contgapcnt < 1 and boxupcnt < 2 then {notbuycon = 124;} } if lp1234dr < 0 and !(entbartrend == 1 or bgstvolcon == 1) then { if !(sto10k > sto10d and sto20k > sto20d) then {notbuycon = 131;} if (!(sp > lp1 or (dayindex() == 0 and contgapcnt > 0 and upV >= bfdaybgstdownV) or (dayindex() > 0 and C[1] > O[1] and C > d2boxhigh + Faddbox)) or (lpshupresist == 1 and C <= dayhigh(0)[1] + Faddbox)) and !( (dayopenC > dayhigh(1) and dayopenvol > bfdaybgstvol and dayopenupV > 0.3 and C > dayhigh(1)) or ( spmpnlpdupcon == 1 and contbidaskcnt > 0 and (sto65up == 2 or sto130up == 2) and displp3 > dispL ) ) then //or (sto65k > sto65d and sto65dL1 < stoL) //or (sto65k[1] < stoL and sto65d > sto65dL1) ) ) ) then {notbuycon = 132;} } if sto10k < sto10dh1 and sto10dh1 > stoh and sto20k < sto20dh1 and sto20dh1 > stoh and (sto65k < sto65dh1 and (sto65dh1 > stoh or sto65dh1 < sto65dh2)) and sto130k < sto130d and !(lp0123dr > 1 or uplongtrend > 0 or sto65up1 == 2 or sto130up1 == 2) then {notbuycon = 141;} if dayindex() > 0 and boxshupresist > 0 and box7shupresist > 0 and d4boxdep < depvaluemax and C <= d4boxhigh and bidask < 0 and (contbidaskcnt < 0 or C <= dayhigh(0)[1] + Faddbox) and !(uplongtrend > 0 and (bgstvolcon == 1 or bgstupVcon == 1) and (sto10up > 1 or sto20up > 1) and C > lp1) then {notbuycon = 142;} if dayhigh(0) < d7boxhigh + Faddbox and dayhigh(0) < d4boxhigh + depvaluemin and (boxshupresist > 1 or box7shupresist > 1) and (boxshupresist[1] > 1 or box7shupresist[1] > 1) and (boxshupresist[2] > 1 or box7shupresist[2] > 1) and stodh10or20downcon == 1 and C < dayhigh(0)[1] and C < bar6high[1] and bar6dep < depvaluemin and daydownVavg > dayupVavg * 1.2 then {notbuycon = 143;} if dayindex() == 11 and C < dayhigh(1) and sp < lp1 and (boxshupresist > 0 or box7shupresist > 0) and !((lp0123dr > 1 or lp1234dr > 0) or (uplongtrend > 0 and (bgstvolcon == 1 or bgstupVcon == 1) and (sto10up > 1 or sto20up > 1))) then {notbuycon = 144;} if !(uplongtrend > 0 or (lp1 > lp3 and lp3 > lp4 and lp4 > lp4[1])) and (C < d3boxhigh or C < d4boxhigh) and (sto10k < sto10dh1 or sto20k < sto20dh1) and sto65k < sto65d and box7shupresist > 2 and !(contgapcnt > 0 and C > d2boxhigh and C > lp1 and (downlongtrend == 0 or (C > dayclose(1) * 1.02 and upV > depvaluemin / 2))) then {notbuycon = 145;} if dayindex() == 0 and C <= d3boxhigh + depvaluemin1 and stodh10or20downcon == 1 and !(uplongtrend > 0 or upbidaskcon == 1 or (bgstupVcon == 1 and upV > depvaluemin)) and ((contgapcnt < 1 or (box7shupresist > 0 and contbidaskcnt < -1)) and daylow(0) < d3boxhigh) and !(stok65n130Lcon ==1 and (sto10up == 3 or sto20up == 3) and C > dayclose(1) * 1.02) and !(C > d2boxhigh and C > lp1 and (borbfupbidaskcon == 1 or entbartrend == 1)) then {notbuycon = 146;} if sto65k > stoh and sto130k > stoh and displp3[1] > disph and simri >= simh and stodh10n20hcon == 1 then {notbuycon = 147;} if lp1234dr < 1 and stodh65or130hcon == 1 and stodh10or20hcon == 1 and boxshupresist > 0 and box7shupresist > 1 and sto10k < stoh and sto20k < stoh and !((sto10up > 1 and sto20up > 1) or (bgstvolcon == 1 and bgstupVcon == 1) or upbidaskcon == 1) then {notbuycon = 148;} if (boxshupresist > 0 or box7shupresist > 0) and C <= dayhigh(1) + Faddbox and C <= dayhigh(0)[1] + Faddbox and lp123convercon == 1 and stodh10n20hcon == 1 then {notbuycon = 149;} if lp1234dr < 1 and stodh10or20hcon == 1 and box7shupresist > 0 and box7shupresist[1] > 2 and box7shupresist[2] > 2 and lp123convercon == 1 then {notbuycon = 150;} if !(uplongtrend > 0 or lp0123dr > 1) and d4boxdep < depvaluemin3 + depvaluemid1 and dayhigh(0) < d4boxhigh and daylow(0) > d4boxlow and C < dayhigh(0)[1] and tboxdep < d4boxdep / 2 and upV <= Faddbox then {notbuycon = 151;} if (sto65down2 == 2 and sto130down2 == 2 and sto65k < sto65d and sto130k < sto130d) and lp1 < lp1[1] and lp1[1] < lp1[2] and C < d2boxhigh and !(V > V[1] or contgapcnt > 0) then {notbuycon = 152;} if boxshupresist > 1 and box7shupresist > 0 and stodh10n20downcon == 1 and C <= dayhigh(1) and sto65k < sto65d and ((sto10k < sto10d and sto10down2 == 2) or (sto20k < sto20d and sto20down2 == 2)) then {notbuycon = 153;} if !(uplongtrend > 0 or lp0123dr > 1) and C <= dayhigh(2) and C < lp2 and ((lpshupresist > 0 and boxshupresist > 0 and box7shupresist > 2) or (boxshupresist > 1 and box7shupresist > 2)) then //and bfdaydownlpcnt > 8 then {notbuycon = 154;} if !(uplongtrend > 0 or lp0123dr > 1) and C <= dayhigh(1) and lpshupresist > 0 and C < lp2 and stodh10or20hcon == 1 and stodh10n20downcon == 1 then //and bfdaydownlpcnt > 8 then {notbuycon = 155;} if uplongtrend == 0 and lp123n4convercon == 1 and lpshupresist > 0 and (boxshupresist > 0 or box7shupresist > 0) and C <= d2boxhigh + Faddbox and !(borbfupbidaskcon == 1) then {notbuycon = 156;} if stok65n130hcon == 1 and displp3 > disph and simri >= simh and C <= dayhigh(1) + depvaluemin and C <= d4boxhigh + depvaluemin and stodh10or20downcon == 1 then {notbuycon = 157;} if !(uplongtrend > 0 or lp0123dr > 1) and C < dayhigh(1) and (stodh65or130hcon == 1 or downlongtrend > 0) and stodh10or20hcon == 1 and (lpshupresist > 0 or lpcrupcon > 0) and (boxshupresist > 0 or box7shupresist > 0) and !(upV > depvaluemin1 and (bgstvolcon == 1 or bgstupVcon == 1 or borbfupbidaskcon > 0)) and !(spmpnlpdupcon == 1 and upV > depvaluemin) then {notbuycon = 158;}// 09.01.02 ÀÛ¼º } // ---------- Áß°£Á¤µµ¹× ÃÖ´ë¹èÆÃ Æ÷Áö¼Ç ¸Å¼öÁøÀÔ ±ÝÁö Á¶°Ç°áÁ¤ ·çƾ ---------- // {notbuyregcon = 0; notbuybetcon = 0;} if notbuycon > 0 and !(entbartrend > 0 and (boxshupresist < 2 or box7shupresist < 2)) then {notbuyregcon = 99; notbuybetcon = 99;} if !(entbartrend == 1 or (dayindex() > 3 and upV >= 0.5 and upV > daybgstdownV and upV > daybgstupV)) then { if yboxdep <= Fdepvaluemid and C <= dayhigh(1) and sto65k[1] > stoL and sto65up <> 2 and !(lp0123dr > 2 or lp023dr > 0 or lp1234dr > 0 or (lp0123dr == 2 and contgapcnt > 0) or (sp > lp and lp > lp1 and sp > sp[1] and lp > lp[1])) then {notbuyregcon = 01; notbuybetcon = 01;} if d3boxdep <= Fdepvaluemid and C <= d3boxhigh and C <= dayhigh(0)[1] and sto65k < sto65d and bidask < 0 and upV < 0.3 then {notbuyregcon = 02; notbuybetcon = 02;} if (lp0123dr < 0 or downlongtrend > 0) and !(C > lp1 and lp1 > lp1[1]) and (sto65up < 2 and sto65up1 < 2) and !((dayindex() > 0 or (V > bfdaybgstvol and upV > bfdaybgstdownV and upV > bfdaybgstupV)) and boxupbetcnt > 1 and sto10d > sto10dh1) and !(C > lp1 and spmpnlpdupcon == 1 and C > d2boxhigh + Faddbox and sto10up1 > 1 and sto20up1 > 1) and !(C > d4boxhigh and C > lp1 + Faddbox and C > lp2 and (C > lp3 or stodL65n130upcon == 1)) then {notbuyregcon = 03; notbuybetcon = 03;} if !(splp01dr > 0 or lp0123dr > 0 or uplongtrend > 0 or (boxupcnt > 0 and (sto65k > sto65d or sto20up > 1 or sto10up > 1 or (Cnlp1234con == 2 and spmpnlpdupcon == 1 ))) or (boxupcnt > 1 and contgapcnt > 0) or (sto65up == 2 or sto65up1 == 2) or (C > d4boxhigh + Faddbox and C > lp1 + Faddbox and C > lp2 and C > lp3)) then {notbuyregcon = 04; notbuybetcon = 04;} if d2boxdep < depvaluemid1 and C < d2boxhigh + Faddbox and sto65k < sto65d and (stok10n20hcon == 1 or stodh10or20hcon == 1) then {notbuyregcon = 05; notbuybetcon = 05;} } // ---------- ¾Æ·¡ÀÇ ¸Åµµ ±ÝÁö Á¶°ÇÀ» Á¦ÇÑÇÏ´Â Á¶°Ç ---------- // forcedsellcon = 0; if (lp0123dr < -1 or lp1234dr < 0 or lp1dupcon < 0) or Crossdown520con == 1 or !(C >= daylow(1) and (sp > sp[1] or sp[1] > sp[2] or lp > lp[1] or lp[1] > lp[2]) and (sto10k > sto10dL1 or sto20k > sto20dL1)) then if lp < lp[1] and (lp[1] < lp[2] or bgstvolcon == 1 or bgstdownVcon == 1) then if !(lp123convercon == 1 and C >= daylow(1) and sp > lp1) and !(sto65k > sto65d and sto65k > sto65k[1] and sto65dL1 < stoL and C > lp1 and boxdowncnt < 2) then { if C < lp1 - Faddbox and dayhigh(0) < dayhigh(2) and dayhigh(0) < dayhigh(1) and downV > daybgstupV and sto65k[1] > stoh and sto65k < sto65d and sto20down > 1 and sto10down > 1 and V > V[1] and (sph1 < sph2 or mph1 < mph2 or lph1 < lph2) then {forcedsellcon = 01;} if entbartrend == -1 and (sto20k < sto20d or bgstvolcon == 1) and (C < lp1 or ((sto65k < stoh or sto65k < sto65d) and C < daylow(0)[1])) and !(sto65k > sto65d and ((sto65d > sto65dL1 and sto65dL1 < stoL) or (sto65dL1 > sto65dL2 and sto65dL2 < stoL))) then { if Crossdown520con == 1 then {forcedsellcon = 11;} if lp1 < lp1[1] and lpshdownresist < 2 then { if sto10down1 > 1 and sto20down1 > 1 then {forcedsellcon = 12;} if lp1234dr < 0 or sto65k < sto65d then {forcedsellcon = 13;} if !(sto10d > sto10dL1 and (lp123convercon == 1 or sto10dL1 < stoL or sto10dL1 > sto10dL2)) and !(sto20d > sto20dL1 and (lp123convercon == 1 or sto20dL1 < stoL or sto20dL1 > sto20dL2)) then {forcedsellcon = 14;} } } if (C < daylow(0)[1] - 0.4 and downV > depvaluemin and C < dayhigh(0) * 0.96 and entbartrend == -1 and dayindex() < 10) then {forcedsellcon = 31;} if ( (lp1234dr < 0 or (downlongtrend == 1 and lp1 < lp2 and lp1 < lp3 and lp1 < lp1[1])) and (borbfdownbidaskcon == 1) and contbarcnt < -1 and C < yboxmid and ((dayindex() == 0 and C < dayclose(1)) or C < daylow(0)[1]) ) and !(lp > lp[1] and lp[1] > lp[2]) and !(C > daylow(2) - Faddbox and C >= daylow(1) and C >= daylow(0)[1] - Faddbox and stodL10or20Lcon == 1 and stodL10n20upcon == 1) then {forcedsellcon = 32;} if (entbartrend == -1 and (borbfdownbidaskcon == 1) and bgstvolcon== 1 and bgstdownVcon == 1) and !(downlonglpdr == 0 and lp0123dr > -2 and lp3 > lp3[1] and lp1 > lp3 and lp2 > lp3 and lp3 > lp4 and lp123or4convercon == 1 and stodL10n20upcon == 1 and sto65k > sto65d) then {forcedsellcon = 33;} } { if (lp1234dr < 1 and lp234dr < 1 and sp < lp1 and lp < lp1 and (sto10down > 1 or sto20down > 1) and stodh10or20hcon == 1 and sto65dh1bar < sto65dL1bar and sto65dh1 > stoh and (entbartrend == -1 or clbartrend == -1 or clbartrend1 == 1) and C < daylow(0)[1]) then {forcedsellcon = 51;} if (lpshupresist > 0 and (boxshupresist > 0 or box7shupresist > 0) and (bgstvolcon == 1 or bgstdownVcon == 1) and C < yboxmid and C < tboxmid - Faddbox and downV >= depvaluemin and V > V[1] and V[1] > V[2] and splp1dupcon == -1 and mplpnlp12dupcon == -1) then {forcedsellcon = 54;} if (lp1234dr == -2 and downV > depvaluemid and C < mp and C < lp2 and sto130k < stoL and displp3 < dispL) then {forcedsellcon = 55;} } // ---------- °Å·¡±ÝÁö Á¶°Ç ÆÇ´Ü(½Å±Ô ¸ÅµµÁøÀÔ ±ÝÁö Á¶°Ç) ---------- // notsellcon = 0; if forcedsellcon == 0 then { if (sp > lp1 and mp > mp[1]) then {notsellcon = 01;} if !(C[1] <= O[1] or (C < O[1] and C < O[2] and (downV >= Faddbox or C <= C[1] - Faddbox))) then {notsellcon = 02;} if !(boxdowncnt > 0 or (sellmincon > 0 and downV >= Faddbox) or entbartrend == -1 or ((downlongtrend == 1 and lp1 < lp4 and (entbartrend == -1 or clbartrend == -1)) and (downV > depvaluemin or tboxdep > depvaluemin1))) and !((sto10down > 1 or sto20down > 1) and stodh10or20hcon == 1 and sto65dh1bar < sto65dL1bar and sto65dh1 > stoh and (entbartrend == -1 or clbartrend == -1 or clbartrend1 == 1)) then {notsellcon = 03;} if !((sto10k < sto10k[1] or (sto10k < sto10d and sto20k < sto20k[1] and sto20k < sto20d and (contbarcnt < 0 or contvolcnt > 0)) or (contgapcnt < 0 and splpdupcon == -1 and splp1dupcon == -1 and (contbarcnt < 0 or contvolcnt > 0))) and (sto10k < sto10d or (dayindex() == 0 and C < dayclose(1)) or (mp < mp[1] and V > V[1]) or bgstvolcon == 1 or (downV > daybgstupV and downV > daybgstdownV) or (bgstdownVcon == 1 and spmpnlpdupcon == -1))) then {notsellcon = 04;} if !(sto20k < sto20d or lp < lp[1] or (Crossdown520con == 1 and downV > depvaluemin and (entbartrend == -1 or bgstvolcon == 1)) or ((downlongtrend == 1 and lp1 < lp4 and (entbartrend == -1 or clbartrend == -1)) and (downV > depvaluemin or tboxdep > depvaluemin1))) and !(lp1234dr < 0 and (borbfdownbidaskcon == 1) and contbarcnt < -1 and C < yboxmid and ((dayindex() == 0 and C < dayclose(1)) or C < daylow(0)[1]) ) then {notsellcon = 05;} if !((sto20k < stoL and downV >= 0.3) or sto20k >= stoL) and !(C < d4boxlow and C < daylow(0)[1]) and !(contgapcnt < 0 and splpdupcon == -1 and splp1dupcon == -1 and (contbarcnt < 0 or contvolcnt > 0)) then {notsellcon = 06;} if downV * 2 < downupV and downupV >= 0.5 and !(C < daylow(1) or C < daylow(0)[1]) then {notsellcon = 07;} if C >= daylow(1) and C >= daylow(2) and stodL10n20upcon == 1 and !(downlongtrend == 1 or lp0123dr < -1 or downV > depvaluemin / 2 or sto65down == 2 or sto130down == 2 or borbfdownbidaskcon == 1) then {notsellcon = 08;} if (lp123convercon == 1 and C >= daylow(1) and sp > lp1 and downV < depvaluemin) then {notsellcon = 11;} if (sto65k > sto65d and sto65k > sto65k[1] and sto65dL1 < stoL and C > lp1 and boxdowncnt < 2) then {notsellcon = 12;} if !(dayhigh(0) < daylow(1) or (bidask < 0 and bidask < bidask[1]) or boxdowncnt > 0 or (V > V[1] and C < daylow(0)[1]) or bgstvolcon == 1 or (downV > daybgstupV and downV > daybgstdownV and C < daylow(0)[1] and stok10n20Lcon == 0) or ((downlongtrend == 1 and lp1 < lp4 and (entbartrend == -1 or clbartrend == -1)) and (downV > depvaluemin or tboxdep > depvaluemin1))) then {notsellcon = 23;}// 2007.1Faddbox8 ¼öÁ¤ if !(splp01dr < 0 or lp0123dr < 0 or downlongtrend > 0 or boxdowncnt > 0 or downbidaskcon == 1 or entbartrend == -1) and !(V > V[1] * 2 and bgstdownVcon == 1 and downV > depvaluemin and sto65up == 0 and sto130up == 0 and C < daylow(0)[1] - Faddbox) then {notsellcon = 24;}// 2007.5.1 ¼öÁ¤ if (lp0123dr > 2 or uplongtrend > 0) and yboxdep <= Fdepvaluemax and boxdowncnt == 0 and entbartrend == 0 and !(V > V[1] * 2 and bgstdownVcon == 1 and downV > depvaluemin and sto65up == 0 and sto130up == 0 and C < daylow(0)[1] - Faddbox) then {notsellcon = 25;} if bidask > bidask[1] and bapL1 > bapL2 and !(bgstvolcon == 1 and (C < d4boxlow or (crossdown520con == 1 and bgstdownVcon == 1))) and !((bgstvolcon == 1 or bgstdownVcon == 1) and downlongtrend > 0 and C < lp1 and C < d2boxlow) and !(contgapcnt < 0 and splpdupcon == -1 and splp1dupcon == -1 and (contbarcnt < 0 or contvolcnt > 0)) then {notsellcon = 26;} if sto20k < stoL and yboxdep < Fdepvaluemid and tboxdep < Fdepvaluemid and boxdowncnt < 1 and C >= daylow(0) then {notsellcon = 27;} if (lp0123dr > 0 or uplongtrend > 0 or contgapcnt >= 0) and d2boxdep < Fdepvaluemid and C > d2boxlow - 0.3 and stok10or20Lcon == 1 and sto10k > sto10kL1 then {notsellcon = 28;}// 2007.5.1 ¼öÁ¤ if contboxcnt > 1 and C >= d2boxlow and (sto65k < stoL or stok10or20Lcon == 1 or sto20k > sto20dL1) and !(Crossdown520con == 1 and downV > depvaluemin and (entbartrend == -1 or bgstvolcon == 1)) and !((downlongtrend == 1 and lp1 < lp4 and (entbartrend == -1 or clbartrend == -1)) and (downV > depvaluemin or tboxdep > depvaluemin1)) then {notsellcon = 29;}// 2007. 5. 21ÀÛ¼º- 2ȸ ÀÌ»óÀÇ ¹Ú½º±Ç¿¡¼­ ¸Åµµ°Å·¡±ÝÁö-¸Å¼ö¿Í Á¶°Ç »óÀÌ if d3boxdep <= Fdepvaluemid and C >= d3boxlow -Faddbox and dayhigh(0) <= d3boxhigh and sto65k < stoh and !(contgapcnt < 0 or C < d2boxlow - Faddbox) and !(lp023dr < -2 or lp1234dr < -1) and !((lp1234dr < 0 or (downlongtrend == 1 and lp1 < lp2 and lp1 < lp3 and lp1 < lp1[1])) and (borbfdownbidaskcon == 1) and contbarcnt < -1 and C < yboxmid and ((dayindex() == 0 and C < dayclose(1)) or C < daylow(0)[1]) ) and !(spmpnlpdupcon == -1 and bgstvolcon == 1 and bgstdownVcon == 1) and !(stok65n130hcon == 1 and stodh65or130hcon == 1 and spmpnlpdupcon == -1 and C < d2boxlow) then {notsellcon = 30;} if lp1234dr > 0 and lp > lp1 and !(C < d2boxlow - Faddbox or downV >= 1 or entbartrend == -1) then {notsellcon = 32;} if lp234dr == 1 and lp1 < lp1[1] and !(O > lp1 and O > lp2 and C < lp1 and C < lp2) and !(contgapcnt < 0 or entbartrend == -1 or lp1dupcon == -1 or (lp0123dr < 0 and spmpnlpdupcon == -1 and yboxmid - tboxmid > 0 and ((!(yboxmid - tboxmid < depvaluemin and y2boxmid - yboxmid < depvaluemin) or (sto10down == 3 or sto20down == 3)) and (yboxmid - tboxmid > depvaluemin or bgstvolcon == 1 or bgstdownVcon == 1)) and (lpshdownresist == 0 or bgstvolcon == 1 or bgstdownVcon == 1) and ((sto65dh1 > stoh and C < d2boxlow - Faddbox and C < daylow(0)[1] - Faddbox and (bapdown == 2 or contbidaskcnt < 0)) or sto65down == 2 or sto130down == 2))) and !(lp0123dr < 0 and C < lp1 and C < lp2 and C < lp3 and bgstvolcon == 1 and bgstdownVcon == 1) then {notsellcon = 33;} if sto10k > sto10d and !(lp0123dr < -2 or downlongtrend > 0 or entbartrend == -1 or clbartrend == -1) and (boxdowncnt == 0 or sto10k > sto10dh1 or sto20k > sto20dh1 or (sto10dL1 < stoL and sto10k > sto10kL1)) and !(downV >= 0.5 and V > V[1] and C < daylow(0)[1]) then {notsellcon = 34;} if lp1234dr == 2 and !(boxdowncnt > 2 or sto10down > 1 or sto20down > 1 or (C < lp1 and boxdowncnt > 1 and sto65k < sto65d)) then {notsellcon = 35;} if dayindex() > 0 and lp1 > lp1[1] and !(entbartrend == -1 or sto65k < sto65d or boxdowncnt > 1 or (boxdowncnt > 0 and C < lp1 - Faddbox and stok65n130hcon == 1 and downV > depvaluemin3) or ((sto20down1 == 2 or sto10down1 == 2) and (downlongtrend > 0 or (bgstvolcon == 1 and clbartrend < 0 and downV > depvaluemin / 2) or (bgstdownVcon == 1 and downV > depvaluemin) or (borbfdownbidaskcon > 0 and stok65or130hcon == 1)))) then {notsellcon = 36;} if !( (sp < sp[1] and sp[1] < sp[2]) or entbartrend == -1 or clbartrend == -1 or downV > daybgstupV or downV1 > daybgstupV or V > dayopenvol or V[1] > dayopenvol or ((borbfdownbidaskcon == 1) and (V > V[1] or V[1] > V[2])) ) then {notsellcon = 37;} if !((lp0123dr < 0 or downlongtrend > 0) and sp < lp2 and sp < lp3 and lp3 < lp3[1]) and sto20k[1] < stoL and sto10k > sto10dL1 and sto10k > stoL then {notsellcon = 38;} if lp1234dr > 0 and dayindex() > 2 and C >= daylow(0)[1] - Faddbox and downbidaskcon == 0 and contgapcnt == 0 and sto65k < stoh then {notsellcon = 39;} if (lp1234dr > 0 or (lp234dr > 0 and lp1 > lp2)) and C > lp2 and boxdowncnt < 2 and !(sph1 < sph2 or mph1 < mph2 or lph1 < lph2 or downhb5con == 1 or downhb10con == 1 or downhb20con == 1) then {notsellcon = 40;} if sto65k < stoL and sto10dh1 >= sto10dh2 and sto20dh1 >= sto20dh2 and ((sto10dL1 > sto10dL2 and sto10k > sto10dL1 and sto10dL1 < stoL) or (sto20dL1 > sto20dL2 and sto20k > sto20dL1 and sto20dL1 < stoL)) and !(lp1234dr < 0 and (borbfdownbidaskcon == 1) and contbarcnt < -1 and C < yboxmid and ((dayindex() == 0 and C < dayclose(1)) or C < daylow(0)[1]) ) then {notsellcon = 41;} if lp1234dr > -1 and !((sto10down > 2 or sto20down > 2) and (borbfdownbidaskcon == 1) and (lp1234dr < 0 or lp123n4convercon == 0)) and C >= daylow(1) - Faddbox and C >= d4boxlow and sto65k > sto65d and ((sto10d > sto10dL1 and (lp123convercon == 1 or sto10dL1 < stoL)) or (sto20d > sto20dL1 and (lp123convercon == 1 or sto20dL1 < stoL))) and !(V > V[1] * 2 and bgstdownVcon == 1 and downV > depvaluemin and sto65up == 0 and sto130up == 0 and C < daylow(0)[1] - Faddbox) then {notsellcon = 42;} if daysellclcon == 1 then //and !(V > V[1] and V > vp and C < daylow(0)[1] -Faddbox) then { if !(C < daylow(0)[1] - Faddbox or (sp[1] >= lp1 and sp < lp1) //or (V > V[1] and V > vp) or downbidaskcon == 1 or (bfdownbidaskcon == 1 and bidask < bidask[1]) or (dayindex() > 0 and ((downV > daybgstupV and downV > daybgstdownV and V > V[1]) or (bgstdownVcon == 1 and spmpnlpdupcon == -1)))) then {notsellcon = 61;} if sto65k < stoL and sto130k < stoL and sto20k < stoL and sto10k > sto10d and sto10dL1 < stoL and C >= daylow(0) - Faddbox then {notsellcon = 62;} } if dayindex() == 0 and !(lp1234dr < 0 and (borbfdownbidaskcon == 1) and contbarcnt < -1 and C < yboxmid and ((dayindex() == 0 and C < dayclose(1)) or C < daylow(0)[1]) ) then { if (C >= daylow(1) or (sto65k < stoL and !(downV > bfdaybgstupV and downV > bfdaybgstupV))) then {notsellcon = 71;} if C < daylow(1) and downV < 1 and downupV > downV * 2 then {notsellcon = 72;} } if stodL10or20Lcon == 1 then { if lp1234dr > -1 and sto65k < stoL and C >= daylow(1) and downV < daybgstupV and downV < daybgstdownV then {notsellcon = 81;} } if sto20k > sto20d and !((lp1234dr < 0 or (downlongtrend == 1 and lp1 < lp2 and lp1 < lp3 and lp1 < lp1[1])) and (borbfdownbidaskcon == 1) and contbarcnt < 0 and C < yboxmid and ((dayindex() == 0 and C < dayclose(1)) or C < daylow(0)[1]) ) then { if !(splp01dr < 0 or lp0123dr < -1 or downlongtrend > 0 or boxdowncnt > 1 or (lp < lp[1] and lp[1] < lp[2]) or Crossdown520con == 1) and !(bgstvolcon == 1 or bgstdownVcon == 1 or entbartrend == -1) then {notsellcon = 91;} if (sto10dL1 < stoL and sto10k > sto10dL1) and !(lp < lp[1] and contgapcnt < 0) and ((!((sto10k < sto10d and sto10dh1 < sto10dh2 and sto20k < sto20k[1] and sto20k < sto20dh1) or (sto10dL1 > sto10dL2 or sto20dL1 > sto20dL2))) or (dayclose(1) < yboxmid and dayopen(0) > dayclose(1) and dayopen(0) > yboxmid and sto10dL1 < stoL)) and !(mplpnlp12dupcon == -1 and C < daylow(0)[1] and downV > daybgstupV and downV > depvaluemin / 2 and displp3 < dispL and simri <= simL and sto65k < stoL and sto20k < 30 and sto10k < 30) and !(sto10k < sto10d and spmpnlpdupcon == -1 and mplpnlp12dupcon == -1 and bapdown == 2 and C < daylow(0)[1] - Faddbox) then {notsellcon = 92;} if sto65k < stoL and lp[1] > lp[2] then //or lp[2] > lp[3]) then {notsellcon = 93;} if !(lp < lp[1] and lp[1] < lp[2]) and !((Crossdown520con == 1 and (bgstvolcon == 1 or bgstdownVcon == 1)) or (downlongtrend == 1 and (entbartrend == -1 or clbartrend == -1) and tboxdep > depvaluemin1)) then {notsellcon = 94;} } if sto65k > sto65d then { if lp1 > lp1[1] and sp > lp1 then { if upgapcon == 1 and C > upgaplow and !(lp0123dr < 0 or downlongtrend > 0) and !(((entbartrend == -1 or downbidaskcon == 1) and (sto10down > 1 or sto20down > 1)) or (C < lp1 - Faddbox and (bgstvolcon == 1 or bgstdownVcon == 1) and (sto65k > stoh or sto130k > stoh) and (sto10down == 3 or sto20down == 3))) then {notsellcon = 101;} if lpshdownresist > 1 and !(lp0123dr < 0 or downlongtrend > 0) then {notsellcon = 102;} } if dayindex() == 0 and (O > d3boxlow or O > d4boxlow) and H - C < C - L and C - L >= 0.5 and ((sto20k > sto20dL1 and sto20down <> 2) or (sto10k > sto10dL1 and sto10down <> 2)) then {notsellcon = 103;} if C >= daylow(1) and C >= daylow(2) and !(entbartrend == -1 or clbartrend == -1 or sto10down > 1 or sto20down > 1 or bgstvolcon == 1) then {notsellcon = 104;} if sto65dL1 > sto65dL2 and sto65dL2 < stoL and C >= daylow(1) - Faddbox and C >= d2boxlow and C >= d4boxlow and entbartrend == 0 and sto65k < stoh and !((V > V[1] and downV > upV1) or (spmpnlpdupcon == -1 and contbidaskcnt < 0 and (sto65down == 2 or sto130down == 2 or sto10down > 1 or sto20down > 1) and displp3 < disph)) then// 2008.01.22 ÀÛ¼º {notsellcon = 105;} } if C > daylow(1) and !((sto10down > 1 or sto20down > 1) and stodh10or20hcon == 1 and sto65dh1bar < sto65dL1bar and sto65dh1 > stoh and (entbartrend == -1 or clbartrend == -1 or clbartrend1 == 1)) and !(bgstvolcon == 1 and bgstdownVcon == 1 and lp < lp1 and C < lp and lp < lp[1]) then { if C > daylow(0)[1] and !((sto10down > 2 or sto20down > 2) and (borbfdownbidaskcon == 1) and (lp1234dr < 0 or lp123n4convercon == 0)) and ((lp1234dr > -1 and sto65k < stoh) or (sto65k < stoL and daylow(0) >= daylow(1))) and !(lp1234dr < 0 and (borbfdownbidaskcon == 1) and contbarcnt < -1 and C < yboxmid and ((dayindex() == 0 and C < dayclose(1)) or C < daylow(0)[1]) ) then {notsellcon = 111;} if !(lp0123dr < -1 or downlongtrend > 0) and !(((sp < sp[1] and sp[1] < sp[2] and lp < lp[1] and lp[1] < lp[2]) or entbartrend == -1 or downV > daybgstupV or downV1 > daybgstupV or ((borbfdownbidaskcon == 1) and (V > V[1] or V[1] > V[2])) or V > dayopenvol or V[1] > dayopenvol) and (dayuplpcnt < 6 or sto65k > stoh)) and !(V > V[1] * 2 and bgstdownVcon == 1 and downV > depvaluemin and sto65up == 0 and sto130up == 0 and C < daylow(0)[1] - Faddbox) then {notsellcon = 112;} } if lp1234dr > 0 and !(entbartrend == -1 or bgstvolcon == 1) then { if !(sto10k < sto10d and sto20k < sto20d) then {notsellcon = 121;} } if C >= daylow(0)[1] then { if C >= daylow(1) and sto65k < stoL and stodL10or20Lcon == 1 and !(entbartrend == -1 or borbfdownbidaskcon == 1 or bgstvolcon == 1 or bgstdownVcon == 1) then {notsellcon = 131;} } if lp1 > lp1[1] and lp1[1] > lp1[2] and lp1 > lp2 and lp2 > lp3 and !(sto65k > stoh or sto130k > stoh or (sto65d < sto65dh1 and sto65dh1 > stoh) or boxdowncnt > 1) and (dayindex() == 0 or !(entbartrend == -1 or bgstvolcon == 1 or bgstdownVcon == 1)) then { if C > lp1 - Faddbox then {notsellcon = 141;} if spnlp1234con > 0 then {notsellcon = 142;} } if !(C < lp1 - Faddbox and (C[1] < lp1[1] - Faddbox or downV >= Faddbox)) then { if uplongtrend > 0 and sto65k > sto65d and !(V > V[1] * 2 and bgstdownVcon == 1 and downV > depvaluemin and sto65up == 0 and sto130up == 0 and C < daylow(0)[1] - Faddbox) then { if C >= daylow(1) then {notsellcon = 151;} if C >= d2boxlow - Faddbox and !(entbartrend == -1 or (bgstvolcon == 1 and bgstdownVcon == 1)) then {notsellcon = 152;} } } if boxshdownresist + box7shdownresist > 4 and C >= daylow(0)[1] and !(contgapcnt < 0 and dayhigh(0) < d2boxlow) and (lp123convercon == 1 or stok10or20Lcon == 1 or stodL10or20Lcon == 1) then {notsellcon = 161;} if !(lp0123dr < -1 or downlongtrend > 0) and (boxshdownresist > 1 or box7shdownresist > 1) and dayclose(1) - C < depvaluemid and bar6dep < depvaluemin1 and C >= daylow(0)[1] and C >= d2boxlow and C >= d3boxlow and C >= d4boxlow then {notsellcon = 162;} if dayindex() > 0 and boxshdownresist > 0 and box7shdownresist > 0 and d4boxdep < depvaluemax and C >= d4boxlow and bidask > 0 and !(contbidaskcnt < 0 or C < dayhigh(0)[1] - Faddbox) then {notsellcon = 163;} if sto65k > sto65d and C >= d2boxlow and !(entbartrend == -1 or bgstvolcon == 1 or bgstdownVcon == 1 or lp1234dr < -1 or borbfdownbidaskcon == 1) and ((sto10dL1 > sto10dL2 and sto10k > sto10dL1) or (sto20dL1 > sto20dL2 and sto20k > sto20dL1)) then {notsellcon = 164;} if lp[1] - lp < 0.02 and bfdayuplpcnt > 6 and dayclose(1) > bfdaycloselp and lp1234dr > -1 and C >= d2boxlow - Faddbox and box7shdownresist > 1 and !(entbartrend == -1 or downbidaskcon == 1) then {notsellcon = 165;} if C >= d4boxlow - depvaluemin and (boxshdownresist > 0 or box7shdownresist > 0) and sto10dL1 < stoL and sto10k > sto10dL1 and sto10dL1bar < sto10dh1bar and sto10dL1bar < 10 then {notsellcon = 166;} if stodL10or20Lcon == 1 and C >= daylow(1) - Faddbox and (boxshdownresist > 0 or box7shdownresist > 0) and sto20k < stoL then {notsellcon = 167;} if dayindex() == 0 and C >= d3boxlow and contgapcnt > -1 and (O - C) / 2 < C - L and stodL10or20upcon == 1 then {notsellcon = 168;} if uplongtrend > 0 and C >= d2boxlow - Faddbox and downV < Faddbox and C >= daylow(0)[1] then {notsellcon = 169;} if C >= daylow(1) - Faddbox and C >= d4boxlow - Faddbox and (stodL10or20upcon == 1 or stok10or20Lcon == 1) and d4boxdep < Fdepvaluemax and !((lp1234dr < -1 and (sto65down == 2 or sto130down == 2)) or (sto65k < sto65d and sto65dh1 > stoh and sto65dh1bar < sto65dL1bar)) then {notsellcon = 170;} if downlongtrend == 0 and C >= daylow(1) then { if (lpshdownresist > 0 or lpshdownresist[1] > 0) and sto20k > sto20d and sto65k > stoL then {notsellcon = 171;} if ((yboxdep < depvaluemin3) or (yboxdep < Fdepvaluemid)) and sto20k > sto20d and !(sto10k < sto10d and spmpnlpdupcon == -1 and mplpnlp12dupcon == -1 and bapdown == 2 and C < daylow(0)[1] - Faddbox) then {notsellcon = 172;} } if d4boxdep < depvaluemax and d3boxhigh > dayhigh(1) and dayhigh(1) > dayhigh(0) and d3boxlow < daylow(1) and C >= daylow(1) - Faddbox and sto65k > sto65d and sto65dL1 < stoL and lp > lp[1] and lp[1] > lp[2] then {notsellcon = 181;} if C > daylow(2) - Faddbox and C >= daylow(1) and C >= daylow(0)[1] - Faddbox and stodL10or20Lcon == 1 and stodL10n20upcon == 1 and !(entbartrend < 0 or bgstvolcon == 1) then {notsellcon = 182;} if dayindex() == 0 and stodL65or130Lcon == 1 and stodL10n20Lcon == 1 and contbidaskcnt > 1 and C >= d2boxlow and bfdayuplpcnt > 7 then {notsellcon = 183;} if lp > lp[1] and lp[1] > lp[2] then { if !(bgstvolcon == 1 or bgstdownVcon ==1 or H < lp) then {notsellcon = 191;}// 08.10.21 ÀÛ¼º } if downlongtrend == 0 and lp1 > lp1[1] and stok10n20Lcon == 1 and lp123convercon == 1 and (sto65up == 2 or sto130up == 2 or (sto65d > sto65dL1 and sto65dL1 < stoL) or (sto130d > sto130dL1 and sto130dL1 < stoL)) and !(splp1dupcon == -1 or mplp1dupcon == -1 or lplp1dupcon == -1) then {notsellcon = 201;} if downlonglpdr == 0 and lpshdownresist > 0 and (boxshdownresist > 0 or box7shdownresist > 0) and stodL65or130Lcon == 1 and stodL10or20upcon == 1 and C >= daylow(1) - depvaluemin1 and C >= d2boxlow then {notsellcon = 202;} if lp > lp[1] and lp[1] > lp[2] then { if C >= d4boxlow and C >= d7boxlow and C <= d4boxlow + depvaluemin1 and C <= d7boxlow + depvaluemin1 and stodL10n20upcon == 1 then {notsellcon = 211;} } if dayindex() == 0 then { if V > bfdayopenvol then { if ((sto10k > sto10d and sto10d > sto10dL1 and sto10dL1 < stoL) and (sto20k > sto20d and sto20d > sto20dL1 and sto20dL1 < stoL)) then {notsellcon = 221;} } else if ((sto10k > sto10d and sto10d > sto10dL1 and sto10dL1 < stoL) or (sto20k > sto20d and sto20d > sto20dL1 and sto20dL1 < stoL)) then {notsellcon = 222;} if downlongtrend == 0 and bidask > bidask[1] and (sto20up > 1 or sto10up > 1 or stodL10or20Lcon == 1) and sto10d > sto10d[1] and (boxshdownresist > 0 or box7shdownresist > 0) then {notsellcon = 223;} } if !(downlongtrend == 1 or lp023dr < -1) and lpshdownresist > 0 and (boxshdownresist > 0 or box7shdownresist > 0) and C >= daylow(1) - 0.3 and C >= daylow(0)[1] - Faddbox and lp123or4convercon == 1 then {notsellcon = 231;} if C >= daylow(1) and downV <= depvaluemin1 and downV <= downupV + Faddbox and (lpcrdownresist > 0 or lpshdownresist > 0 or lpcrdowncon == 1) and (boxshdownresist > 0 or box7shdownresist > 0) and !(entbartrend < 0 or bgstvolcon == 1 or bgstdownVcon == 1) then {notsellcon = 232;} if !(downlonglpdr == 1 or lp0123dr < -1) and lp3 > lp3[1] and lp1 > lp3 and lp2 > lp3 and lp3 > lp4 and lp123or4convercon == 1 and stodL10n20upcon == 1 and sto65k > sto65d then {notsellcon = 233;} if lp1234dr == 2 and C > lp1 - Faddbox and sp > lp1 and lp > lp1 and C >= daylow(1) then {notsellcon = 234;} } // ---------- Áß°£Á¤µµ¹× ÃÖ´ë¹èÆÃ Æ÷Áö¼Ç ¸ÅµµÁøÀÔ ±ÝÁö Á¶°Ç°áÁ¤ ·çƾ ---------- // {notsellregcon = 0; notsellbetcon = 0;} if notsellcon > 0 and !(entbartrend < 0) then {notsellregcon = 99; notsellbetcon = 99;} if !(entbartrend == -1 and (borbfdownbidaskcon == 1) and bgstdownVcon == 1) then if !(C < lp1 - Faddbox and dayhigh(0) < dayhigh(2) and dayhigh(0) < dayhigh(1) and downV > daybgstupV and sto65k[1] > stoh and sto65k < sto65d and sto20down > 1 and sto10down > 1 and V > V[1] and (sph1 < sph2 or mph1 < mph2 or lph1 < lph2)) then if !(sp < lp1 and lp < lp1 and (sto10down > 1 or sto20down > 1) and stodh10or20hcon == 1 and sto65dh1bar < sto65dL1bar and sto65dh1 > stoh and (entbartrend == -1 or clbartrend == -1 or clbartrend1 == 1)) then { if C < O and downV <= Faddbox and downV1 <= Faddbox and (sto10k < stoL or sto20k < stoL) then {notsellregcon = 01; notsellbetcon = 01;} if d2boxdep < Fdepvaluemax and C >= d2boxlow and sto65k[1] < stoh and sto65down < 2 and sto130down < 2 and !(downV > d2boxdep / 2 or (bgstvolcon == 1 and bgstdownVcon == 1 and downbidaskcon == 1) or C < d2boxlow - Faddbox) and !(lp0123dr < -2 or lp023dr < 0 or lp1234dr < 0 or (lp0123dr == -2 and contgapcnt < 0)) and !(spmpnlpdupcon == -1 and bgstvolcon == 1 and bgstdownVcon == 1 and sto20k < sto20d and C < lp1 and (sto10down > 1 or sto20down > 1) and contbidaskcnt < 0 and stodL10or20Lcon == 0) then {notsellregcon = 02; notsellbetcon = 02;} if yboxdep < Fdepvaluemid and C >= daylow(1) and sto65k[1] < stoh and sto65down < 2 and sto130down < 2 and !(lp0123dr < -2 or lp023dr < 0 or lp1234dr < 0 or (lp0123dr == -2 and contgapcnt < 0)) and !(spmpnlpdupcon == -1 and bgstvolcon == 1 and bgstdownVcon == 1 and sto20k < sto20d and C < lp1 and (sto10down > 1 or sto20down > 1)) then {notsellregcon = 03; notsellbetcon = 03;} if ((lp0123dr > 0 or uplongtrend > 0) and !(C < lp1 and lp1 < lp1[1]) and sto65down < 2 and sto130down < 2 and downV <= Faddbox) or boxupbetcnt > 0 then {notsellregcon = 04; notsellbetcon = 04;} if !(splp01dr < 0 or lp0123dr < 0 or downlongtrend > 0 or (boxdowncnt > 0 and (sto65k < sto65d or sto20down > 1 or sto10down > 1 or (Cnlp1234con == -2 and spmpnlpdupcon == -1))) or (entbartrend == -1 and (sto10down > 1 or sto20down > 1 or (Cnlp1234con == -2 and spmpnlpdupcon == -1)) and (sto65down == 2 or sto65k + 3 < sto65dh1)) or (boxdowncnt > 1 and contgapcnt < 0) or (sto65down == 2 or sto65down1 == 2) or (spmpnlpdupcon == -1 and mplpnlp12dupcon ==-1 and (bgstvolcon == 1 or bgstdownVcon == 1)) or (spmpnlpdupcon == -1 and bgstvolcon == 1 and bgstdownVcon == 1) ) then {notsellregcon = 05; notsellbetcon = 05;} if !(lp1 < lp1[1] or C < lp1 or contgapcnt < 0 or entbartrend < 0) and sto65down <> 2 and sto130down <> 2 and !(C < daylow(1) and downV > daybgstupV and downV > bfdaybgstupV and V > V * 1.5 and (sto10down > 1 or sto20down > 1)) then {notsellregcon = 06; notsellbetcon = 06;} if lp234dr > 0 and C > lp2 //and !(uplongtrend == 0 and C < d2boxlow - Faddbox) and !(entbartrend == -1 or downbidaskcon == 1 or sto65down == 2 or sto20down > 1 or contgapcnt < 0) then {notsellregcon = 07; notsellbetcon = 07;} if bflp1234dr > 0 and lp1234dr == 0 and !(downV > Faddbox or contgapcnt > 0) then {notsellregcon = 08; notsellbetcon = 08;} if dayindex() > 3 and tboxdep <= Fdepvaluemin and C >= daylow(0)[1] - Faddbox and downV <= 0.3 and !(contgapcnt < 0 and splpdupcon == -1 and splp1dupcon == -1 and (contbarcnt < 0 or contvolcnt > 0)) then {notsellregcon = 10; notsellbetcon = 10;} if (uplongtrend > 0 or sto65up1 == 2 or sto130up1 == 2) and !(C < lp1 - 0.3 and (C[1] < lp1[1] - Faddbox or downV >= 0.3)) and !((downlongtrend == 1 and lp1 < lp4 and (entbartrend == -1 or clbartrend == -1)) and (downV > depvaluemin or tboxdep > depvaluemin1)) then {notsellregcon = 11; notsellbetcon = 11;}// 07.7.1 ¼öÁ¤(¸ÅµµÁøÀÔÀüüÀû¿ë½Ã ¼öÀÍ·ü Ç϶ôÇÔ) if C >= daylow(1) and stodL10n20Lcon == 1 and (downV < upV1 or downV < downV1) and !(lp1234dr < 0 and (borbfdownbidaskcon == 1) and contbarcnt < -1 and C < yboxmid and ((dayindex() == 0 and C < dayclose(1)) or C < daylow(0)[1]) ) and !(sto10k < sto10d and spmpnlpdupcon == -1 and mplpnlp12dupcon == -1 and bapdown == 2 and C < daylow(0)[1] - Faddbox) then {notsellregcon = 12; notsellbetcon = 12;} if lp1 > lp1[1] then { if !(lp0123dr < 0 or downlongtrend > 0) and contgapcnt < 0 and C > dayopen(0) and downV <= 0.3 then {notsellregcon = 21; notsellbetcon = 21;} if (sto20k < stoL or sto10k < stoL) and dayindex() == 11 then {notsellregcon = 22; notsellbetcon = 22;} if !(entbartrend == -1 or borbfdownbidaskcon == 1 or sto65k < sto65d or sto20down1 == 2 or sto10down1 == 2 or boxdowncnt > 1 or (boxdowncnt > 0 and C < lp1 - Faddbox and stok65n130hcon == 1 and downV > depvaluemin3)) then {notsellregcon = 23; notsellbetcon = 23;} if (!(uplongtrend == 0 and C < d2boxlow - Faddbox) and !(C < d3boxlow) and sto65k < stoh and stok10or20Lcon == 1) or (stok10n20Lcon == 1 and (C >= daylow(0)[1] - Faddbox or bidask > bidask[1])) and !(downlongtrend == 1 and sp < lp1 and (bgstvolcon == 1 or bgstdownVcon == 1 or entbartrend < 0)) then {notsellregcon = 24; notsellbetcon = 24;} } if sto65k < stoL and sto20k < stoL and sto20d > sto20dL1 and sto20dL1 < stoL and sto10k < stoL and sto10d > sto10dL1 and sto10dL1 < stoL then {notsellregcon = 31; notsellbetcon = 31;} if lp1234dr == 2 and !(contgapcnt < 0 or sp < lp1 ) and dayindex() > 3 and !((downV > daybgstdownV and downV > daybgstupV) or C < daylow(0)[1] - Faddbox or entbartrend == -1) then {notsellregcon = 32; notsellbetcon = 32;} if sto65k > sto65d then { if !(lp0123dr < 0 or lp1234dr < 0) and C >= L[1] and downV < 0.3 then {notsellregcon = 41; notsellbetcon = 41;} if (dayindex() == 11 or stime == 143000) and lp123n4convercon == 1 and !((C < lp2 and C < lp3 and C < lp4 and lp2 < lp2[1] and lp3 < lp3[1] and lp4 < lp4[1])) then {notsellregcon = 42; notsellbetcon = 42;}// ÀÌÆò¼±¼ö·Å½Ã } } // ---------- °ú¿­±Ç ¶Ç´Â °ú³Ã±Ç¿¡¼­ À§Çè°ü¸®À» À§ÇØ »¡¸® û»êÇÏ´Â Á¶°Ç ---------- // {addbuyclcon = 0; addbuyclconcnt = 0;} //if notbuyclgrd < 3 then { { //if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then // {addbuyclcon = 01; addbuyclconcnt = addbuyclconcnt + 1;} if sto10down > 1 or sto20down > 1 then {addbuyclcon = 02; addbuyclconcnt = addbuyclconcnt + 1;} if lpshupresist > 0 then {addbuyclcon = 03; addbuyclconcnt = addbuyclconcnt + 1;} if boxshupresist > 0 or box7shupresist > 0 then {addbuyclcon = 04; addbuyclconcnt = addbuyclconcnt + 1;} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {addbuyclcon = 05; addbuyclconcnt = addbuyclconcnt + 1;} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {addbuyclcon = 06; addbuyclconcnt = addbuyclconcnt + 1;} if bgstvolcon == 1 or (dayindex() > 0 and ((V > V[1] * 1.5 and V > vp) or V > V[1] * 1.7)) then {addbuyclcon = 07; addbuyclconcnt = addbuyclconcnt + 1;} if bgstdownVcon == 1 or downV > depvaluemin1 then {addbuyclcon = 08; addbuyclconcnt = addbuyclconcnt + 1;} //if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then // {addbuyclcon = 09; addbuyclconcnt = addbuyclconcnt + 1;} //if stok10n20hcon == 1 then // {addbuyclcon = 10;} } } {addsellclcon = 0; addsellclconcnt = 0; addsellclcon99 = 0; addsellclconcnt99 = 0;} //if notsellclgrd < 3 then { { if C < dayclose(1) * 0.96 or C < dayclose(2) * 0.96 or C < dayclose(3) * 0.94 or C < dayclose(4) * 0.92 then {addsellclcon99 = 01; addsellclconcnt99 = addsellclconcnt99 + 1;} if sto10up > 1 or sto20up > 1 then {addsellclcon = 02; addsellclconcnt = addsellclconcnt + 1; addsellclcon99 = 02; addsellclconcnt99 = addsellclconcnt99 + 1;} if lpshdownresist > 0 then {addsellclcon = 03; addsellclconcnt = addsellclconcnt + 1; addsellclcon99 = 03; addsellclconcnt99 = addsellclconcnt99 + 1;} if boxshdownresist > 0 or box7shdownresist > 0 then {addsellclcon = 04; addsellclconcnt = addsellclconcnt + 1; addsellclcon99 = 04; addsellclconcnt99 = addsellclconcnt99 + 1;} if entbartrend == 1 or clbartrend == 1 or clbartrend1 == 1 then {addsellclcon = 05; addsellclconcnt = addsellclconcnt + 1; addsellclcon99 = 05; addsellclconcnt99 = addsellclconcnt99 + 1;} if (borbfupbidaskcon == 1 or (bidask > 0 and bapup == 2 and contbidaskcnt > 0)) then {addsellclcon = 06; addsellclconcnt = addsellclconcnt + 1; addsellclcon99 = 06; addsellclconcnt99 = addsellclconcnt99 + 1;} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {addsellclcon = 07; addsellclconcnt = addsellclconcnt + 1; addsellclcon99 = 07; addsellclconcnt99 = addsellclconcnt99 + 1;} if bgstupVcon== 1 or upV > depvaluemin1 then {addsellclcon = 08; addsellclconcnt = addsellclconcnt + 1; addsellclcon99 = 08; addsellclconcnt99 = addsellclconcnt99 + 1;} if C < dayclose(1) * 0.98 and (lp1234dr > -1 or contbidaskcnt > 0 or displp3con > 0) then {addsellclcon99 = 10; addsellclconcnt99 = addsellclconcnt99 + 1;} if stodL10or20Lcon == 1 and (lp1234dr > -2 or displp3con > 0) then {addsellclcon99 = 51; addsellclconcnt99 = addsellclconcnt99 + 1;} } } // ---------- °Å·¡±ÝÁö Á¶°Ç ÆÇ´Ü(¸Å¼öû»ê ±ÝÁö Á¶°Ç) ---------- // {notbuyclgrd = 0; notbuyclcon = 0;} if !(contgapcnt > 0 and tboxdep <= Fdepvaluemin2 and dayindex() > 3 and C >= daylow(0)[1] and C >= dayopen(0) and sto65k > stoh and sto20k > stoh and sto10k > stoh) and !(C < d2boxlow - Faddbox) and !(bgstvolcon == 1 and downV > daybgstupV and downV > bfdaybgstupV and downV >= depvaluemin1 and C < daylow(1) - Faddbox) then if C > lp1 - Faddbox then { if !( ((sto65down == 2 or (sto65dh1 > stoh and sto65k < sto65d and sto65k < sto65k[1])) and sto65k < stoh) or ((sto130down == 2 or (sto130dh1 > stoh and sto130k < sto130d and sto130k < sto130k[1])) and sto130k < stoh) ) and !(sto65k < stoh and sto130k < stoh and sto20down == 3) then { if !(sto65k[1] > stoh and sto65k < sto65d and (downV > daybgstupV and V > V[1])) or !(sto65k < sto65dh1 and sto65dh1 > stoh and sto65k < sto65d and sto65dh1bar < sto65dL1bar) then { if lp1dupcon == 1 then {notbuyclgrd = 1; notbuyclcon = 01;} //if (sto65up == 2 or sto130up == 2) and lp123n4convercon == 0 then // {notbuyclgrd = 1; notbuyclcon = 02;} if lp234dr == 1 then {notbuyclgrd = 1; notbuyclcon = 11;}// »èÁ¦½Ã ¼öÀÍ·ü °¨¼Ò if lp124dr == 1 then {notbuyclgrd = 1; notbuyclcon = 12;} if lp134dr == 1 then {notbuyclgrd = 1; notbuyclcon = 13;} if lp0123dr == 2 then {notbuyclgrd = 1; notbuyclcon = 14;} if lp0123dr == 3 then { if lp3 > lp4 then {notbuyclgrd = 2; notbuyclcon = 21;} else if notbuyclgrd < 2 then {notbuyclgrd = 1; notbuyclcon = 15;} } if lp1234dr == 1 then { if lp1 > lp4 and lp2 > lp4 and lp4 > lp4[1] then {notbuyclgrd = 2; notbuyclcon = 22;} if lp1 > lp4 and lp0123dr == 3 then {notbuyclgrd = 2; notbuyclcon = 23;} if lp3 > lp4 then {notbuyclgrd = 2; notbuyclcon = 24;}// 09.01.06 ÀÛ¼º else if notbuyclgrd < 2 then {notbuyclgrd = 1; notbuyclcon = 16;} } if lp1234dr == 2 then {notbuyclgrd = 2; notbuyclcon = 25;} } } if yboxdep < Fdepvaluemin and C <= dayhigh(1) and C >= daylow(1) and C > lp1 - Faddbox and sp > lp1 and (lp0123dr > 1 or uplonglpdr == 1) and !(lp1234dr < 2 and sto65k > stoh and sto10down > 1 and sto20down > 1 and C < lp) then {notbuyclgrd = 3; notbuyclcon = 91;}// »èÁ¦½Ã ¼öÀÍ·ü °¨¼Ò if dayindex() > 1 and tboxdep <= Fdepvaluemin and C >= daylow(0)[1] and sp > lp1 and (lp0123dr > 1 or uplonglpdr == 1 or contgapcnt > 0) and !(stok65n130hcon == 1 and displp3 > disph and sto65k < sto65d and sto20k < sto20d and C < lp and (downhb5con == 1 or downhb10con == 1)) and !(dayhigh(0) <= d4boxhigh + Faddbox and stok65n130hcon == 1 and stodh10or20hcon == 1 and C < lp and (borbfdownbidaskcon == 1) and ( (Crossdown(displp3,disph) or (dayhighdisplp3 > disph and displp3 < disph)) or (Crossdown(simri,69) or (dayhighsimri >= simh and simri < simh)) )) then {notbuyclgrd = 3; notbuyclcon = 92;} if yboxdep <= depvaluemin3 and tboxdep <= depvaluemin3 and yboxdep <= Fdepvaluemin2 and tboxdep <= Fdepvaluemin2 and C <= dayhigh(1) and C >= daylow(1) and C >= daylow(0)[1] and sp > lp1 and lp > lp1 and lp1 > lp2 and lp1 > lp1[1] and sto65k > sto65d and !(bgstvolcon == 1 and bgstdownVcon == 1) then {notbuyclgrd = 3; notbuyclcon = 93;} if bar6dep <= depvaluemin and !(stok10n20hcon == 1 or stodh10or20hcon == 1 or (V > V[1] * 1.5 and V > vp) or (sto65up <> 2 and sto130up <> 2 and lp1 < lp2 and lp2 < lp3 and lp3 < lp4)) then {notbuyclgrd = 3; notbuyclcon = 94;} if bar6dep <= depvaluemin and tboxdep < depvaluemin1 and sp > lp and lp > lp1 and lp1234dr > 0 and lp1 > lp4 and lp2 > lp4 and sto65k > sto65d and sto65k > sto65k[1] and sto130k > sto130d and sto130k > sto130k[1] then {notbuyclgrd = 3; notbuyclcon = 95;} } // ---------- °Å·¡±ÝÁö Á¶°Ç ÆÇ´Ü(¸ÅµµÃ»»ê ±ÝÁö Á¶°Ç) ---------- // {notsellclgrd = 0; notsellclcon = 0;} if !(bgstvolcon == 1 and bgstupVcon == 1 and upV >= depvaluemin1 and C > dayhigh(1) + Faddbox) then if C < lp1 + Faddbox then { if !( ((sto65up == 2 or (sto65dL1 < stoL and sto65k > sto65d and sto65k > sto65k[1])) and sto65k > stoL) or ((sto130up == 2 or (sto130dL1 < stoL and sto130k > sto130d and sto130k > sto130k[1])) and sto130k > stoL) ) then { if !(sto65k < stoL and sto65k > sto65d and upV > daybgstdownV and V > V[1]) then { if lp1dupcon == -1 then {notsellclgrd = 1; notsellclcon = 01;} //if (sto65down == 2 or sto130down == 2) and lp123n4convercon == 0 then // {notsellclgrd = 1; notsellclcon = 02;} if lp234dr == -1 then {notsellclgrd = 1; notsellclcon = 11;} if lp124dr == -1 then {notsellclgrd = 1; notsellclcon = 12;} if lp134dr == -1 then {notsellclgrd = 1; notsellclcon = 13;} if lp0123dr == -2 then {notsellclgrd = 1; notsellclcon = 14;} if lp0123dr == -3 then { if lp3 < lp4 then {notsellclgrd = 2; notsellclcon = 21;} else if notsellclgrd < 2 then {notsellclgrd = 1; notsellclcon = 15;} } if lp1234dr == -1 then { if lp < lp4 and clbartrend < 1 and upbidaskcon == 0 then {notsellclgrd = 2; notsellclcon = 22;} else if lp3 < lp4 then {notsellclgrd = 2; notsellclcon = 23;} else if notsellclgrd < 2 then {notsellclgrd = 1; notsellclcon = 16;} } if lp1234dr == -2 then { if clbartrend < 1 and upbidaskcon == 0 then {notsellclgrd = 2; notsellclcon = 24;} else if notsellclgrd < 2 then {notsellclgrd = 1; notsellclcon = 17;} } } } if lp1234dr == -2 and C < lp1 + Faddbox and !(C > dayhigh(1) + Faddbox or C > dayhigh(2) + Faddbox or C > dayhigh(3) + Faddbox or C > dayhigh(4) + Faddbox or (boxshdownresist > 0 and box7shdownresist > 0)) and !(daylow(0) >= daylow(1) and stok65n130Lcon == 1 and stodL10n20Lcon == 1) then { if !(sto65k < stoL and ((displp3 < dispL and stok10n20Lcon == 1 and sto10d > sto10dL1 and sto20d > sto20dL1) or (displp3 < 91 and stok10or20Lcon == 1) or (!(displp3 < dispL and simri <= simL) and stok10n20Lcon == 1 and (bapup == 2 or borbfupbidaskcon == 1)))) then {notsellclgrd = 3; notsellclcon = 81;} if !((sto65k > sto65d and sto130k < stoL) and (displp3 < dispL and sto10k[1] < stoL and sto20d > sto20dL1)) then {notsellclgrd = 3; notsellclcon = 82;} if !(stok65or130Lcon == 1 and sto65d > sto65dL1 and sto130d > sto130dL1 and !(displp3 < dispL and simri <= simL)) then {notsellclgrd = 3; notsellclcon = 83;} if !(stok65or130Lcon == 0 and sto65d > sto65dL1 and sto130d > sto130dL1 and stok10n20Lcon == 1 and C > d4boxlow and !(displp3 < dispL and simri <= simL)) then {notsellclgrd = 3; notsellclcon = 84;} } if downlongtrend > 0 and lp1 < lp4 and lp2 < lp4 and lp3 < lp4 and C < d7boxlow - depvaluemin and C < lp1 + Faddbox then {notsellclgrd = 3; notsellclcon = 90;} if dayindex() > 1 and tboxdep <= Fdepvaluemin and C <= dayhigh(0)[1] and sp < lp1 and (lp1234dr < 0 or lp0123dr < -1 or contgapcnt < 0) and !(entbartrend == 1 or clbartrend == 1 or borbfupbidaskcon == 1) then {notsellclgrd = 3; notsellclcon = 91;} if (bar6dep <= depvaluemin or bar12dep <= depvaluemin1 or (bar6dep <= depvaluemin1 and bar6highavg < lp1 and C < dayhigh(0)[1] and boxdowncnt > 1 and !(lpshdownresist > 0 and (boxshdownresist > 0 or box7shdownresist > 0)))) and !(stok10n20Lcon == 1 or stodL10or20Lcon == 1 or (V > V[1] * 1.5 and V > vp) or (sto65down <> 2 and sto130down <> 2 and lp1 > lp2 and lp2 > lp3 and lp3 > lp4)) then {notsellclgrd = 3; notsellclcon = 92;} if dayindex() < 11 and (sto65k < sto65d and sto130k < sto130d and sto65k < stoh and sto130k < stoh and ((sto65dh1 > stoh and sto65dh1bar < 25) or (sto130dh1 > stoh and sto130dh1bar < 25))) and !(upbidaskcon == 1 or upbidaskcon == 1 or (bgstvolcon == 1 and bgstupVcon == 1) or lp123or4convercon == 1 or C > daylow(1) - Faddbox or lpcrdownresist > 0 or lpshdownresist > 0) then {notsellclgrd = 3; notsellclcon = 93;} } // ---------- À§ÀÇ ¸Å¼öû»ê¹× ¸ÅµµÃ»»ê ±ÝÁö Á¶°Ç¿¡µµ ºÒ±¸Çϰí û»êÇÏ´Â Á¶°Ç ---------- // forcedbuyclcon = 0; if notbuyclgrd < 3 then { if clbartrend == -1 and dayindex() > 0 then {forcedbuyclcon = 01;} if (notbuyclgrd < 2 or (sto20k < stoh and sto10k < stoh)) and downbidaskcon == 1 then {forcedbuyclcon = 02;} if sto65k < sto65d then {forcedbuyclcon = 03;} //if sto65k < stoh then // {forcedbuyclcon = 04;} if displp3 < disph and simri < simh and sto65k > stoh and sto65d < sto65dh1 and sto20k < sto20dh1 and sto20dh1 > stoh and sto10k < sto10d and sto20k < sto20k[1] and (sto65up <> 2 or sto130up <> 2) then {forcedbuyclcon = 05;} if sto65k < sto65dh1 and (sto65up <> 2 or sto65k > stoh or (lp1234dr > 1 and (boxcrupresist > 0 or boxshupresist > 0 or C < dayhigh(1)) )) then {forcedbuyclcon = 06;} if sto20down > 1 and sto20d < stoh and sto20k[1] < sto20d[1] then {forcedbuyclcon = 07;} if sto10down > 1 and sto10d < stoh and sto10k[1] < sto10d[1] then {forcedbuyclcon = 08;} if ( (contgapcnt > 0 or (upgapcon == 1 and Crossdown(C,upgaplow))) and sto65k > stoh and ( (sto20k[1] > stoh and sto20k[1] < sto20d[1]) or (sto10k[1] > stoh and sto10k[1] < sto10d[1]) ) ) then {forcedbuyclcon = 09;} if sto65k < sto65dh1 and (sto20k[1] > stoh or sto10k[1] > stoh) and downbidaskcon == 1 then {forcedbuyclcon = 10;} if boxdowncnt > 1 and C < O and downV > daybgstupV and downV > daybgstdownV then {forcedbuyclcon = 11;} if lpshupresist > 0 or boxshupresist > 0 then {forcedbuyclcon = 12;} if lp1234dr < 2 and sto65k > stoh and sto130k > stoh and sto20k[1] > stoh and sto10k[1] > stoh and (entbartrend == -1 or clbartrend == -1 or clbartrend == -1 or bapdown == 2 or borbfdownbidaskcon == 1) then {forcedbuyclcon = 13;} if spmpnlpdupcon == -1 then {forcedbuyclcon = 14;} if dayhigh(0) <= d4boxhigh + Faddbox and stok65n130hcon == 1 //and (entbartrend < 0 or clbartrend < 0) and stodh10or20hcon == 1 and C < lp and (borbfdownbidaskcon == 1) and ( (Crossdown(displp3,disph) or (dayhighdisplp3 > disph and displp3 < disph)) or (Crossdown(simri,69) or (dayhighsimri >= simh and simri < simh)) ) then {forcedbuyclcon = 51;} } forcedsellclcon = 0; if notsellclgrd < 3 then { if clbartrend == 1 and dayindex() > 0 then {forcedsellclcon = 01;} if (notsellclgrd < 2 or (sto20k > stoL and sto10k > stoL)) and upbidaskcon == 1 then {forcedsellclcon = 02;} if sto65k > sto65d then {forcedsellclcon = 03;} //if sto65k > stoL then // {forcedsellclcon = 04;} if sto65k > sto65dL1 and ( sto65down <> 2 or (lp1234dr < -1 and C > d4boxlow) or (lp1234dr < -1 and C > d3boxlow) or (lp1234dr < -1 and C > d2boxlow) or (lp1234dr < -1 and C > daylow(1)) ) then {forcedsellclcon = 05;} if sto20up > 1 and sto20d > stoL and sto20k[1] > sto20d[1] then {forcedsellclcon = 06;} if sto10up > 1 and sto10d > stoL and sto10k[1] > sto10d[1] then {forcedsellclcon = 07;} if ( (contgapcnt < 0 or (downgapcon == 1 and Crossup(C,downgaphigh))) and sto65k < stoL and ( (sto20k[1] < stoL and sto20k[1] > sto20d[1]) or (sto10k[1] < stoL and sto10k[1] > sto10d[1]) ) ) then {forcedsellclcon = 08;} if lpshdownresist > 0 or boxshdownresist > 0 then {forcedsellclcon = 09;} if spmpnlpdupcon == 1 then {forcedsellclcon = 10;} if bgstvolcon == 1 and bgstupVcon == 1 then {forcedsellclcon = 21;} } // ---------- ½ºÅä ½Ö¹Ù´Ú, ½ÖºÀ °­Á¦ û»ê ·çƾ ---------- // forcedstoupcon = 0; if ( sto10up > 1 and sto20up > 1 and contbidaskcnt > 0 and ((sto65k < stoL and sto130k < stoL and displp3[1] < dispL and simri <= simL) or (sto65up == 2 and sto65d > stoL) or (sto130up == 2 and sto130d > stoL) or ((boxshdownresist > 0 or box7shdownresist > 0) and C > daylow(1) and ((sto65d > sto65dL1 and sto65d > stoL and sto65dL1 < stoL) or (sto130d > sto130dL1 and sto130d > stoL and sto130dL1 < stoL)))) ) then {forcedstoupcon = 11;} // ---------- ½ºÅä ½Ö¹Ù´Ú, ½ÖºÀ û»ê ±ÝÁö ·çƾ ---------- // notstoupcon = 0; if forcedstoupcon == 0 then if !(sto10up > 1 and sto20up > 1 and sto65k < stoL and (sto130k < stoL or displp3[1] < dispL) and contbidaskcnt > 1) then { if !(notsellclgrd < 2 or (clbartrend == 1 and (tboxdep > Fdepvaluemid or C > dayhigh(0)[1])) or lp1234gapmincon == 1 or lp123n4convercon== 1) then {notstoupcon = 01;} if dayindex() > 3 and !(C > daylow(2) - Faddbox and lp123convercon == 1) then { if tboxdep <= Fdepvaluemin and C <= dayhigh(0)[1] then {notstoupcon = 02;} if tboxdep <= Fdepvaluemin2 and C <= dayhigh(0)[1] and (lp1234dr < -1 or (lp1234dr == -1 and C < lp4)) then {notstoupcon = 03;} } if downbidaskcon == 1 then {notstoupcon = 04;} } notstodowncon = 0; { if !((notbuyclgrd < 2 and (sto65up < 2 or sto65up1 < 2)) or sto65down1 == 2 or (sto65k > stoh and sto65k < sto65d and downbidaskcon == 1)) and !(bgstvolcon == 1 and downV > daybgstupV and downV > daybgstdownV and downV >= 0.5) and !((boxshupresist > 1 or box7shupresist > 1) and lp1234dr < 1) then {notstodowncon = 01;} if sto65k > stoh and d2boxdep <= depvaluemin3 and C >= d2boxlow and C > lp1 - Faddbox and !(clbartrend == -1 or clbartrend1 == -1) then {notstodowncon = 02;} if upbidaskcon == 1 then {notstodowncon = 03;} if d2boxdep < depvaluemin3 and C >= d2boxlow - Faddbox and C > lp1 - Faddbox and (sto65up == 2 and !(sto65down == 2 or sto65k < sto65d or (sto65dh1 > stoh and sto65k < sto65dh1))) then {notstodowncon = 04;} if sp > lp1 and uplongtrend > 0 and C > yboxmid and !(entbartrend == -1 or bgstvolcon == 1 or bgstdownVcon == 1 or borbfdownbidaskcon == 1 or (sto65k < sto65d or (sto65k > stoh and sto65k < sto65k[1])) or (boxshupresist > 0 and box7shupresist > 0 and ((sto10down > 1 and sto10dh2 > stoh) or (sto20down > 1 and sto20dh2 > stoh))) ) then {notstodowncon = 05;} if sp > lp1 and lp > lp1 and lp > lp[1] and lp1 > lp1[1] and !(dayindex() > 0 or C < daylow(1) or (bgstvolcon == 1 and bgstdownVcon == 1) or boxshupresist + box7shupresist > 3) then {notstodowncon = 06;} if lp1234dr > 1 and lp > lp1 and C > lp1 and yboxdep < depvaluemid and bar6dep < depvaluemin3 and sto65d > stoh and C >= yboxmid then {notstodowncon = 07;} if uplongtrend > 0 and lp > lp1 and lp1 > lp2 and lp1 > lp1[1] and lp2 > lp2[1] and dayhigh(0) <= dayhigh(1) and daylow(0) >= daylow(1) and tboxdep < depvaluemin3 and bar6dep < depvaluemin then {notstodowncon = 08;} if lp > lp1 and lp > lp[1] and lp1 > lp1[1] and C > lp and stodL65n130Lcon == 1 then {notstodowncon = 11;} if lp1234dr > 0 and lp3 > lp4 and stok65n130hcon == 1 and sto65k > sto65d and C > daylow(1) and C > daylow(0)[1] and C > lp1 then {notstodowncon = 21;}// 08.12.12 ÀÛ¼º } // ---------- ½ºÅä ½Ö¹Ù´Ú, ½ÖºÀ û»ê ÆÇ´Ü º¸Á¶ ·çƾ ---------- // {stoupcon = 0; stodowncon = 0;} if dayindex() < 12 then // ½ºÅä ½Ö¹Ù´ÚÀ¸·Î ¸Åµµ û»ê { if C > O and C > C[1] then { if !(sp < lp1 and lp1 < lp1[1] and lp1[1] < lp1[2] and (lp0123dr < -1 or downlonglpdr == 1 or sto65down == 2 or (lp0123dr < 0 and sp < lp3 and sp < lp4))) and !((sto65down == 2 or sto130down == 2 or sto65down1 == 2 or sto130down1 == 2) and sto65k > stoL and displp3[1] > dispL) then {stoupcon = 01;} if ( (C > lp + Faddbox or (upV >= Faddbox and (C > lp or boxshdownresist > 0 or C >= daylow(1)))) and dayindex() > 0 and (V > V[1] or lp > lp[1]) and ( !(sp < lp1 and lp1 < lp1[1] and lp1[1] < lp1[2] and downlonglpdr == 1 ) or lp0123dr > -3 or (lp0123dr > -2 and sto65k < stoL) ) ) then {stoupcon = 02;} if ( !(sp < lp1 and lp1 < lp1[1] and lp1[1] < lp1[2] and (lp0123dr < -2 or downlonglpdr == 1)) and (displp3[1] < dispL or sto65k > sto65d) and (sto20k[1] < stoL or sto10k[1] < stoL) ) then {stoupcon = 03;} if (C > lp + Faddbox or (C > lp and upV >= Faddbox) or (boxcrdownresist > 0 and upV >= Faddbox)) and dayindex() > 0 and (V > V[1] or lp > lp[1]) and sto65k < stoL and (sto20k[1] < stoL or sto10k[1] < stoL) then {stoupcon = 04;} if !(lp1234dr < -1 and C < dayhigh(1) and C < dayhigh(0)[1] and upbidaskcon == 0 and bfupbidaskcon == 0) then { if clbartrend == 1 then {stoupcon = 05;} if clbartrend1 == 1 and (sto20k < stoL or sto10k < stoL) then {stoupcon = 06;} } if !(sp < lp1 and lp1 < lp1[1] and lp1[1] < lp1[2] and ((lp1234dr < 0 and lp < lp[1]) or (lp134dr < 0 and C < lp))) and (sto10up == 3 or sto20up == 3) then {stoupcon = 07;} if (d2boxdep <= Fdepvaluemid or d4boxdep <= Fdepvaluemax) and tboxdep < Fdepvaluemid and C > d2boxlow - Faddbox and sto65k < stoL and (sto20dL2 < stoL or sto10dL2 < stoL) and lp1234gapmincon == 1 then {stoupcon = 08;} if C > d2boxlow - Faddbox and sto65k < stoL and (sto20dL2 < stoL or sto10dL2 < stoL) and (lp123convercon == 1 or lp1234gapmincon == 1) then {stoupcon = 09;} if (sto10up > 1 and sto20up > 1 and sto65k < stoL and (sto130k < stoL or displp3[1] < dispL) and contbidaskcnt > 1) then {stoupcon = 10;} /* if ( sto10up > 1 and sto20up > 1 and contbidaskcnt > 1 and ((sto65k < stoL and (sto130k < stoL or displp3[1] < dispL)) or sto65up == 2 or sto130up == 2 or ((boxshdownresist > 0 or box7shdownresist > 0) and V > V[1] and C > daylow(1) and ((sto65d > sto65dL1 and sto65dL1 < stoL) or (sto130d > sto130dL1 and sto130dL1 < stoL)))) ) then {stoupcon = 51;} */ } if C < O and C < C[1] then // ½ºÅä ½ÖºÀÀ¸·Î ¸Å¼ö û»ê { if dayindex() > 0 and !(sp > lp1 and lp1 > lp1[1] and (lp0123dr > 1 or uplongtrend > 0 or sto65up == 2 or stodL65n130Lcon == 1)) and !(sp > lp1 and lp > lp1 and lp > lp[1] and lp1 > lp2 and lp234dr > 0) then {stodowncon = 01;} if (sto20k[1] > stoh or sto10k[1] > stoh or sto10dh2 > stoh or sto20dh2 > stoh or lpcrupresist > 0 or ((borbfdownbidaskcon == 1) and contbidaskcnt < 0)) and !(lp0123dr > 1 or uplongtrend > 0 or sto65up == 2 or stodL65n130Lcon == 1) then {stodowncon = 02;} if ( (C < lp - Faddbox or (C < lp and downV >= Faddbox) or (boxcrupresist > 0 and downV >= Faddbox)) and dayindex() > 0 and (V > V[1] or lp < lp[1]) and ( !(sp > lp1 and uplongtrend > 0) or lp0123dr < 3 or (lp0123dr < 2 and sto65k > stoh) ) ) and !(sto65up1 == 2 and sto130up1 == 2 and C >= lp1 and C >= yboxmid - Faddbox and downbidaskcon == 0 and bfdownbidaskcon == 0) and !(lp1234dr > 0 and bflp1234dr > 0 and lp3 > lp4 and sp > lp1 and lp > lp1 and C > daylow(1) - depvaluemin1 and C > lp1 and (bar6dep < depvaluemin1 or bar6dep < Fdepvaluemin or bar12dep < depvaluemin3 or bar12dep < Fdepvaluemin1)) then {stodowncon = 03;} if ( !(sp > lp1 and lp1 > lp1[1] and (lp0123dr > 2 or uplongtrend > 0)) and (displp3[1] > disph or sto65k < sto65d) and (sto20k[1] > stoh or sto10k[1] > stoh) ) then {stodowncon = 04;} if (C < lp - Faddbox or (C < lp and downV >= Faddbox) or (boxcrupresist > 0 and downV >= Faddbox)) and dayindex() > 0 and (V > V[1] or lp < lp[1]) and sto65k > stoh and (sto20k[1] > stoh or sto10k[1] > stoh) then {stodowncon = 05;} if C < lp and downbidaskcon == 1 and sto65k > stoh and sto20dh1 > stoh and sto10dh1 > stoh then {stodowncon = 06;} if !(sp > lp1 and lp1 > lp1[1] and ((lp1234dr > 0 and lp > lp[1]) or (lp134dr > 0 and C > lp))) and (sto10down == 3 or sto20down == 3) then {stodowncon = 07;} if dayindex() > 3 and (C < lp or (boxcrupresist > 0 and downV >= Faddbox)) and lp < lp[1] and tboxdep > Fdepvaluemin2 and ( (sto65k < sto65d or downbidaskcon == 1) and ((downV >= daybgstupV and downV >= daybgstdownV) or (downV1 >= daybgstupV and downV1 >= daybgstdownV)) ) then {stodowncon = 08;} if clbartrend == -1 and dayindex() > 0 then {stodowncon = 21;} if clbartrend1 == -1 and dayindex() > 0 and (sto20k > stoh or sto10k > stoh) then {stodowncon = 22;} if (borbfdownbidaskcon == 1) and bgstvolcon == 1 and bgstdownVcon == 1 and sto65k > stoh then {stodowncon = 23;} if lp123convercon == 1 and C < dayhigh(1) and C < lp and sto65k > stoh and sto65k < sto65k[1] then {stodowncon = 24;} } } //########## ---------- ¸Å¼ö ---------- ##########// // ¸Åµµ Routine°ú ´Ù¸¥ ºÎºÐÀÌ ÀÖÀ¸³ª ÀÌ´Â ÀÚ¿¬¿ø¸®(Áß·ÂÀÇ ¹ýÄ¢)»ó ´ç¿¬ÇÑ °ÍÀÓ // marketposition() == [1 = ¸Å¼ö, 0 = ¹« Æ÷Áö¼Ç, -1 = ¸Åµµ] if notbuycon == 0 or (entbartrend == 1 and sp > lp1 and lpshupresist < 2) then { if (C > O and C > sp and sp > sp[1] and C > C[1] and (L > L[1] or C > H[1])) and upV > 0.1 then { if dayindex() < 12 then { { if lp > lp[1] then { if lp1L1 > lp1L2 and lp1 > lp1[1] and lpL1 > lpL2 and lpL1 >= lp1 and lp > lp1 and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and C > lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú2060º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú2060º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­2060º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­2060º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­2060º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("2060º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if lp1L1 > lp1L2 and lp1 > lp1[1] and spL1 > spL2 and spL1 > lp1L1 and sp > lp1 and sp > lp and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú560º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú560º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­560º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­560º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­560º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("560º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if lpL1 > lpL2 and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and spL1 > spL2 and spL1 > lpL1 and sp > lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú520º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú520º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­520º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­520º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­520º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("520º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if mpL1 > mpL2 and mp > mp[1] and spL1 > spL2 and spL1 > mpL1 and sp > mp and sp > lp and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú510º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú510º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­510º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­510º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­510º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("510º¹ÇÕ»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if lpL1 > lpL2 and lpL1 >= lp1 and lp1 > lp1[1] and lp > lp1 and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and C > lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú2060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú2060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­2060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­2060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­2060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("2060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if uphb20con == 1 and lp[3] >= lp1 and lp1 > lp1[1] and lp > lp1 and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and C > lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú2060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú2060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­2060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­2060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­2060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("2060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if lpL1 > lpL2 and lpL1 >= lp2 and lp2 > lp2[1] and lp > lp2 and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and C > lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú20120»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú20120»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­20120»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­20120»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­20120»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("20120»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if uphb20con == 1 and lp[3] >= lp2 and lp2 > lp2[1] and lp > lp2 and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and C > lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú20120»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú20120»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­20120»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­20120»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­20120»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("20120»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if mpL1 > mpL2 and mpL1 >= lp and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and mp > lp and mp > mp[1] and mp[1] > mp[2] and C > lp and C > mp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú1020»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú1020»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­1020»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­1020»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­1020»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("1020»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if uphb10con == 1 and mp[3] >= lp and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and mp > lp and mp > mp[1] and C > lp and C > mp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú1020»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú1020»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­1020»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­1020»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­1020»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("1020»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if mpL1 > mpL2 and mpL1 >= lp1 and lp1 > lp1[1] and mp > lp1 and mp > mp[1] and C > lp and C > mp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú1060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú1060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­1060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­1060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­1060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("1060»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if uphb10con == 1 and mp[3] >= lp1 and mp > mp[1] and lp1 > lp1[1] and C > lp and C > mp and mp > lp1 then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú1060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú1060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­1060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­1060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­1060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("1060»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if spL1 > spL2 and spL1 > lp and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and sp > lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú520»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú520»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­520»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­520»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­520»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("520»ó½ÂN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if uphb5con == 1 and sp[3] >= lp and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and sp > lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú520»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú520»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­520»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­520»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­520»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and via < 3 then {Buy("520»ó½ÂȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} } else if lpL1 > lpL2 and lp > lp[1] and (lp[1] > lp[2] or entbartrend > 0) and C > lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú20½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú20½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­20½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­20½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­20½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuyregcon == 0 and buyregcon > 0 and via < 2 then {Buy("20½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuyregcon == 0 and buyregcon > 0 and via < 2 then {Buy("20½Ö¹Ù´Ú-ÃÖ¼Ò¹èÆÃ1",OnClose, DEF, Bcontreg); via = 2;} else if buymincon > 0 and via < 1 then {Buy("20½Ö¹Ù´Ú-ÃÖ¼Ò¹èÆÃ",OnClose, DEF, Bcont5min); via = 1;} } else if mpL1 > mpL2 and mp > mp[1] and C > lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú10½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú10½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­10½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­10½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­10½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("10½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuyregcon == 0 and buyregcon > 0 and via < 2 then {Buy("10½Ö¹Ù´Ú-ÃÖ¼Ò¹èÆÃ1",OnClose, DEF, Bcontreg); via = 2;} else if buymincon > 0 and via < 1 then {Buy("10½Ö¹Ù´Ú-ÃÖ¼Ò¹èÆÃ",OnClose, DEF, Bcont5min); via = 1;} } else if spL1 > spL2 and (sp > lp or (C > lp and C > lp1)) then// ÀÌ ·çƾ Á¦°Å½Ã ¼öÀÍÀÌ ÁÙ¾îµë {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú5½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú5½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­5½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­5½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­5½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("5½Ö¹Ù´Ú-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuyregcon == 0 and buyregcon > 0 and via < 2 then {Buy("5½Ö¹Ù´Ú-ÃÖ¼Ò¹èÆÃ1",OnClose, DEF, Bcontreg); via = 2;} else if buymincon > 0 and via < 1 then {Buy("5½Ö¹Ù´Ú-ÃÖ¼Ò¹èÆÃ",OnClose, DEF, Bcont5min); via = 1;} } } if L > mp and C > lp and upV >= Faddbox then { {savelp = lp; savesp = sp; savec = C;} if sp > mp and (sp > lp1 or (C > dayhigh(0)[1] + 0.4 and upV > 0.6 and C > daylow(0) * 1.04 and entbartrend == 1 and dayindex() < 10) or (C > lp1 and ((lp1 > lp1[1] and lp1[1] > lp1[2]) or contgapcnt > 0 or dayopen(0) <= dayclose(1)))) then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == 1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ5¼±½Ö¹Ù´Ú10ÀÌÆòÀ§-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if (sto65up1 == 2 or sto130up1 == 2) and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ½ºÅä½Ö¹Ù´Ú10ÀÌÆòÀ§-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 1 and C > lp1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ4¼±Á¤¹è¿­10ÀÌÆòÀ§-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp1234dr > 0 and C > lp1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ3¼±Á¤¹è¿­10ÀÌÆòÀ§-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if lp0123dr > 1 and notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("ÀϺÀ2¼±Á¤¹è¿­10ÀÌÆòÀ§-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuybetcon == 0 and buybetcon > 0 and via < 3 then {Buy("10ÀÌÆòÀ§-ÃÖ´ë¹èÆÃ",OnClose, DEF, Bcontby2); via = 3;} else if notbuyregcon == 0 and buyregcon > 0 and via < 2 then {Buy("10ÀÌÆòÀ§-ÃÖ¼Ò¹èÆÃ1",OnClose, DEF, Bcontreg); via = 2;} else if buymincon > 0 and via < 1 then {Buy("10ÀÌÆòÀ§-ÃÖ¼Ò¹èÆÃ",OnClose, DEF, Bcont5min); via = 1;} } } } } } } //########## ---------- ¸Åµµ ---------- ##########// // ¸Å¼ö Routine°ú ´Ù¸¥ ºÎºÐÀÌ ÀÖÀ¸³ª ÀÌ´Â ÀÚ¿¬¿ø¸®(Áß·ÂÀÇ ¹ýÄ¢)»ó ´ç¿¬ÇÑ °ÍÀÓ // marketposition() == [1 = ¸Å¼ö, 0 = ¹« Æ÷Áö¼Ç, -1 = ¸Åµµ] if notsellcon == 0 then { if (C < O and C < sp and sp < sp[1] and C < C[1] and (H < H[1] or C < L[1])) and downV >= 0.1 then { if dayindex() < 12 then { { if !(dayindex() == 0 and (C >= dayclose(1) or (lp1 >= lp1[1] and sto65down == 0 and sto130down == 0))) then { if lp1h1 < lp1h2 and lp1 < lp1[1] and lph1 < lph2 and lph1 < lp1h1 and lp < lp1 and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and C < lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ2060º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ2060º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­2060º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­2060º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­2060º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("2060º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if lp1h1 < lp1h2 and lp1 < lp1[1] and sph1 < sph2 and sph1 < lp1h1 and sp < lp1 then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ560º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ560º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­560º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­560º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­560º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("560º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if lph1 < lph2 and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and sph1 < sph2 and sph1 < lph1 and sp < lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ520º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ520º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­520º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­520º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­520º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("520º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if mph1 < mph2 and mp < mp[1] and sph1 < sph2 and sph1 < mph1 and sp < mp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ510º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ510º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­510º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­510º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­510º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("510º¹ÇÕÇ϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if lph1 < lph2 and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and lph1 <= lp1 and lp1 < lp1[1] and sp < lp and lp < lp1 then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ2060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ2060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­2060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­2060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­2060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("2060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if downhb20con == 1 and lp[3] <= lp1 and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and lp1 < lp1[1] and sp < lp and lp < lp1 then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ2060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ2060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­2060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­2060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­2060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("2060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if lph1 < lph2 and C < lp and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and lph1 <= lp2 and lp2 < lp2[1] and sp < lp and lp < lp2 then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ20120Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ20120Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­20120Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­20120Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­20120Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("20120Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if downhb20con == 1 and lp[3] <= lp2 and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and lp2 < lp2[1] and sp < lp and lp < lp2 then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ20120Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ20120Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­20120Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­20120Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­20120Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("20120Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if mph1 < mph2 and mp < mp[1] and mph1 <= lp and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and C < lp and C < mp and mp < lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ1020Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ1020Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­1020Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­1020Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­1020Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("1020Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if downhb10con == 1 and mp[3] <= lp and mp < mp[1] and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and C < lp and C < mp and mp < lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ1020Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ1020Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­1020Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­1020Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­1020Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("1020Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if mph1 < mph2 and mp < mp[1] and (lp[1] < lp[2] or entbartrend < 0) and mph1 <= lp1 and lp1 < lp1[1] and C < lp and C < mp and mp < lp1 then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ1060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ1060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­1060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­1060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­1060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("1060Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if downhb10con == 1 and mp[3] <= lp1 and mp < mp[1] and (lp[1] < lp[2] or entbartrend < 0) and lp1 < lp1[1] and C < lp and C < mp and mp < lp1 then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ1060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ1060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­1060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­1060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­1060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("1060Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if sph1 < sph2 and sph1 < lp and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and sp < lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ520Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ520Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­520Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­520Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­520Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("520Ç϶ôN-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if downhb5con == 1 and sp[3] <= lp and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and sp < lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ520Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ520Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­520Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­520Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­520Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and via > -3 then {Sell("520Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } else if lph1 < lph2 and lp < lp[1] and (lp[1] < lp[2] or entbartrend < 0) and C < lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ20½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ20½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­20½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­20½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­20½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("20½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellregcon == 0 and sellregcon > 0 and via > -2 then {Sell("20½ÖºÀ-ÃÖ¼Ò¹èÆÃ1",OnClose, DEF, Scontreg); via = -2;} else if sellmincon > 0 and via > -1 then {Sell("20½ÖºÀ-ÃÖ¼Ò¹èÆÃ",OnClose, DEF, Scont5min); via = -1;} } else if mph1 < mph2 and mp < mp[1] and mp[1] < mp[2] and C < lp then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ10½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ10½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­10½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­10½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­10½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("10½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellregcon == 0 and sellregcon > 0 and via > -2 then {Sell("10½ÖºÀ-ÃÖ¼Ò¹èÆÃ1",OnClose, DEF, Scontreg); via = -2;} else if sellmincon > 0 and via > -1 then {Sell("10½ÖºÀ-ÃÖ¼Ò¹èÆÃ",OnClose, DEF, Scont5min); via = -1;} } else if sph1 < sph2 and C < lp then// ÀÌ ·çƾ Á¦°Å½Ã ¼öÀÍÀÌ ÁÙ¾îµë {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ5½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ5½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­5½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­5½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­5½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("5½ÖºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellregcon == 0 and sellregcon > 0 and via > -2 then {Sell("5½ÖºÀ-ÃÖ¼Ò¹èÆÃ1",OnClose, DEF, Scontreg); via = -2;} else if sellmincon > 0 and via > -1 then {Sell("5½ÖºÀ-ÃÖ¼Ò¹èÆÃ",OnClose, DEF, Scont5min); via = -1;} } else if downhb5con == 1 and ( (lp1234dr == -2 and downV > depvaluemid and C < mp and C < lp2 and sto130k < stoL and displp3 < dispL) or ( (sp < lp or sp < mp) and C < lp and ((lp < lp[1] and C < lp1 and C < daylow(0)[1] and (entbartrend == -1 or (bgstvolcon == 1 and bgstdownVcon == 1))) or (lp1234dr < 0 and lp1 < lp4 and tboxdep > depvaluemin1 and (entbartrend == -1 or clbartrend == -1 or (bgstvolcon == 1 and bgstdownVcon == 1)))) ) ) and downV >= 0.5 and (downV1 >= 0.5 or (contbarcnt < -1 and contbidaskcnt < -1)) then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and (sellbetcon > 0 or entbartrend == -1) and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ5Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if sto65down == 2 and notsellbetcon == 0 and (sellbetcon > 0 or entbartrend == -1) and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ5Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and (sellbetcon > 0 or entbartrend == -1) and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­5Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and (sellbetcon > 0 or entbartrend == -1) and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­5Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and (sellbetcon > 0 or entbartrend == -1) and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­5Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and (sellbetcon > 0 or entbartrend == -1 or (bgstvolcon == 1 and bgstdownVcon == 1)) and via > -3 then {Sell("5Ç϶ôȾº¸-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} } } if (via > -1 or (sp < lp and lp < lp1)) and H < mp and C < lp and downV >= Faddbox then { if (lp < lp[1] or (dayopen(0) < daylow(1) and C < daylow(1)) or (C < daylow(0)[1] - 0.4 and downV > 0.6 and C < dayhigh(0) * 0.96 and entbartrend == -1 and dayindex() < 10)) and !(lp1234dr == 2 and upgapcon == 1 and C > lp2 and C >= upgaplow) and !(sto65k > sto65d and sto65k > sto65k[1]) then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀ10ÀÌÆò¹Ø-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3 ;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀ10ÀÌÆò¹Ø-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3 ;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­10ÀÌÆò¹Ø-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­10ÀÌÆò¹Ø-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­10ÀÌÆò¹Ø-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("10ÀÌÆò¹Ø-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3 ;} else if notsellregcon == 0 and sellregcon > 0 and via > -2 then {Sell("10ÀÌÆò¹Ø-ÃÖ¼Ò¹èÆÃ1",OnClose, DEF, Scontreg); via = -2;} else if sellmincon > 0 and via > -1 then {Sell("10ÀÌÆò¹Ø-ÃÖ¼Ò¹èÆÃ",OnClose, DEF, Scont5min); via = -1;} } } } } } } if notsellcon == 0 then { if via > -1 then { if C < O and C < L[1] and O >= sp and O >= lp and C < sp and C < lp and H - L > H[1] - L[1] then { if downV >= 0.5 and sto10k < sto10d and !(lp > lp[1] and lp1 > lp1[1] and lp > lp1) then { if lp < lp[1] or entbartrend == -1 or (C < daylow(0)[1] - 0.4 and downV > 0.6 and C < dayhigh(0) * 0.96 and entbartrend == -1 and dayindex() < 10) or (bgstvolcon == 1 and (C < d4boxlow or (crossdown520con == 1 and bgstdownVcon == 1))) then { if dayindex() < 12 Then { if dayhigh(0) < daylow(1) or (bidask < 0 and bidask < bidask[1]) or (boxdowncnt > 1 or (boxdowncnt > 0 and lp0123dr < -1 and C < daylow(0)[1])) or (dayindex() == 0 and (bidask < 0 or C < daylow(1))) then if upbidaskcon == 0 or dayindex() == 0 then {savelp = lp; savesp = sp; savec = C; if lp1dupcon == -1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ5¼±½ÖºÀÀåÀ½ºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if (sto65down1 == 2 or sto130down1 == 2) and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ½ºÅä½ÖºÀÀåÀ½ºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < -1 and C < lp1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ4¼±¿ª¹è¿­ÀåÀ½ºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp1234dr < 0 and C < lp1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ3¼±¿ª¹è¿­ÀåÀ½ºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if lp0123dr < -1 and notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀϺÀ2¼±¿ª¹è¿­ÀåÀ½ºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellbetcon == 0 and sellbetcon > 0 and via > -3 then {Sell("ÀåÀ½ºÀ-ÃÖ´ë¹èÆÃ",OnClose, DEF, Scontby2); via = -3;} else if notsellregcon == 0 and sellregcon > 0 and via > -2 then {Sell("ÀåÀ½ºÀ-ÃÖ¼Ò¹èÆÃ1",OnClose, DEF, Scontreg); via = -2;} else if sellmincon > 0 and via > -1 then {Sell("ÀåÀ½ºÀ-ÃÖ¼Ò¹èÆÃ",OnClose, DEF, Scont5min); via = -1;} } } } } } } } //########## ---------- ¸ÅµµÃ»»ê ---------- ##########// // ¸Åµµ Routine°ú ´Ù¸¥ ºÎºÐÀÌ ÀÖÀ¸³ª ÀÌ´Â ÀÚ¿¬¿ø¸®(Áß·ÂÀÇ ¹ýÄ¢)»ó ´ç¿¬ÇÑ °ÍÀÓ // marketposition() == [1 = ¸Å¼ö, 0 = ¹« Æ÷Áö¼Ç, -1 = ¸Åµµ] if marketposition() == -1 then if notsellclcon < 81 and (notsellclgrd == 0 or (C > dayhigh(1) + Faddbox and C > dayhigh(0)[1]) or (dayindex() > 0 and V > V[1] and upV >= 0.3 and upbidaskcon == 1 and C > dayhigh(0)[1])) then { if C > O and C > sp and sp > sp[1] and C > C[1] and (L > L[1] or C > H[1]) then if (C[1] >= O[1] and C > H[1]) or (C > O[1] and C > O[2] and (upV >= Faddbox or C >= C[1] + Faddbox)) then if dayindex() < 12 then if downbidaskcon == 0 or dayindex() == 0 then { { if sto10k > sto10k[1] then if (sto20k > sto20d or lp > lp[1]) then { if !(dayindex() == 0 and (C <= dayclose(1) or lp1 <= lp1[1])) then { if lpL1 > lpL2 and lp > lp[1] and spL1 > spL2 and spL1 > lpL1 and sp > lp then { {Exitshort("+520º¹ÇÕ»ó½ÂN");} } if mpL1 > mpL2 and mp > mp[1] and spL1 > spL2 and spL1 > mpL1 and sp > mp then { {Exitshort("+510º¹ÇÕ»ó½ÂN");} } if spL1 > spL2 and spL1 > lp and lp > lp[1] and sp > lp then { {Exitshort("+520»ó½ÂN");} } if uphb5con == 1 and sp[3] >= lp and sp > spL1 and lp > lp[1] and sp > lp then { {Exitshort("+520»ó½ÂȾº¸");} } if lpL1 > lpL2 and lp > lp[1] and lpL1 >= lp1 and lp1 > lp1[1] and C > lp and lp > lp1 then { {Exitshort("+2060»ó½ÂN");} } if uphb20con == 1 and lp[3] >= lp1 and lp > lpL1 and lp > lp[1] and lp1 > lp1[1] and C > lp and lp > lp1 then { {Exitshort("+2060»ó½ÂȾº¸");} } if lpL1 > lpL2 and lp > lp[1] and lpL1 >= lp2 and lp2 > lp2[1] and C > lp and lp > lp2 then { {Exitshort("+20120»ó½ÂN");} } if uphb20con == 1 and lp[3] >= lp2 and lp > lpL1 and lp > lp[1] and lp2 > lp2[1] and C > lp and lp > lp2 then { {Exitshort("+20120»ó½ÂȾº¸");} } if mpL1 > mpL2 and mp > mp[1] and mpL1 >= lp and lp > lp[1] and C > lp and C > mp and mp > lp then { {Exitshort("+1020»ó½ÂN");} } if uphb10con == 1 and mp[3] >= lp and mp > mpL1 and mp > mp[1] and lp > lp[1] and C > lp and C > mp and mp > lp then { {Exitshort("+1020»ó½ÂȾº¸");} } if mpL1 > mpL2 and mp > mp[1] and mpL1 >= lp1 and lp1 > lp1[1] and C > lp and C > mp and mp > lp1 then { {Exitshort("+1060»ó½ÂN");} } if uphb10con == 1 and mp[3] >= lp1 and mp > mpL1 and mp > mp[1] and lp1 > lp1[1] and C > lp and C > mp and mp > lp1 then { {Exitshort("+1060»ó½ÂȾº¸");} } //if mpL1 > mpL2 and C > lp then // { // {Exitshort("+10½Ö¹Ù´Ú");} // } if spL1 > spL2 - 0.1 and C > lp then// ÀÌ ·çƾ Á¦°Å½Ã ¼öÀÍÀÌ ÁÙ¾îµë { {Exitshort("+5½Ö¹Ù´Ú");} } } if L > mp and C > lp and upV >= Faddbox then if !(lp1234dr < 0 and downgapcon == 1 and C < downgaphigh and C < lp1 and V < bfdaybgstvol and upV < bfdaybgstdownV and (dayindex() == 0 or C <= dayhigh(0)[1])) then { if sp > mp and C > (dayhigh(1) + daylow(1))/2 and (lp > lp[1] or C > dayhigh(1) or lp > lp1 or (lp < lp1 and C > lp1) or (lp < lp2 and C > lp2)) then { {Exitshort("+10ÀÌÆòÀ§");} } } } } } } // ---------- ½ºÅä ½Ö¹Ù´Ú½Ã ¸Åµµ û»ê ·çƾ ---------- // //if notsellclgrd < 2 or (clbartrend == 1 and (tboxdep > Fboxdepmid or C > dayhigh(0)[1])) // or lp1234gapmincon == -1 then if marketposition() == -1 then if dayindex() < 12 and C > O and C > C[1] then if notstoupcon == 0 and (stoupcon > 0 or forcedstoupcon > 0) then { if dayindex() > 0 and sto20k > sto20d + 0.5 and sto20k > sto20k[1] and (sto10k > sto10d or (V > V[1] and V[1] > V[2])) and (notsellclcon < 81 or forcedstoupcon > 0 or sto20up == 3 or (contbarcnt > 0 and V > V[1] * 1.2 and V[1] > V[2])) then { if sto20index + 5 >= index or stime >= 140000 then { if (sto20dL1 > stoL and sto20dL1 > sto20dL2 + 3 and stok20L1 > stok20L2 + 3) or (sto10up > 1 and sto20up > 1 and sto65k < stoL and (sto130k < stoL or displp3[1] < dispL) and contbidaskcnt > 1) then { if stoupcon > 0 then {Exitshort("+sto20d+");} else {Exitshort("+sto20d+99");} } { if stok20L1 > stok20L2 and stod20L1 > stod20L2 + 2 then { if stoupcon > 0 then {Exitshort("+sto20d¹Ú½º±Ç+");} else {Exitshort("+sto20d¹Ú½º±Ç+99");} } } } if sto20kL1 > sto20kL2 + 3 and sto20kL1 > sto20d[sto20kL1bar] and sto20kL1bar < 5 and !(sto65k < stoL and sto20d < stoL) then { if stoupcon > 0 then {Exitshort("+sto20k+");} else {Exitshort("+sto20k+99");} } } if sto10k > sto10d + 0.5 and sto10k > sto10k[1] and (sto20k > stoL or lp0123dr > -1 or clbartrend == 1) and (notsellclcon < 81 or forcedstoupcon > 0 or sto10up == 3) then { if sto10index + 5 >= index or stime >= 140000 then { if sto10dL1 > stoL and sto10dL1 > sto10dL2 + 3 and stok10L1 > stok10L2 + 3 then { if stoupcon > 0 then {Exitshort("+sto10d+");} else {Exitshort("+sto10d+99");} } { if stok10L1 > stok10L2 and stod10L1 > stod10L2 + 2 then { if stoupcon > 0 then {Exitshort("+sto10d¹Ú½º±Ç+");} else {Exitshort("+sto10d¹Ú½º±Ç+99");} } } } } } // ---------- ¸¶°¨ ½Ã°£¿¡ ¸Åµµ¿À¹ö ¶Ç´Â û»ê¿©ºÎ °áÁ¤ ·çƾ ---------- // if marketposition() == -1 then if dayindex() == 11 Then { if (C <= dayclose(1) * 0.903 or L <= dayclose(1) * 0.903) and (dayclose(1) < dayclose(2) * 0.95 or (lp > lp1 and (lp > lp[1] or stodL10or20Lcon == 1))) then {Exitshort("+¸¶°¨-ÇÏÇѰ¡Ã»»ê01");} else if !(C < dayclose(1) * 0.92 and dayclose(1) > dayclose(2) * 0.92) or sto65k > sto65d or C > lp1 or (((sto20up > 2 and (sto10up > 1 or sto10d > sto10dL1)) or (sto10up > 2 and (sto20up > 1 or sto20d > sto20dL1))) and ((sto65down < 2 and sto130down < 2) or sto65k < stoL or sto130k < stoL)) then { if contgapcnt < -2 then {Exitshort("+¸¶°¨-¾²¸®°¸Ç϶ôû»ê02");} if contgapcnt < -1 and (C < dayclose(4) * 0.92 or C < dayclose(2) * 0.96) and ((sto65k < stoL and stok10n20Lcon == 1) or (sto20k[1] < stoL and stodL10n20Lcon == 1)) then {Exitshort("+¸¶°¨-Åõ°¸Ç϶ô4%ÀÌ»ó±Þ¶ô03");} if contgapcnt < 0 and (C < dayclose(4) * 0.92 or C < dayclose(2) * 0.96) and sto65k < stoL and stok10n20Lcon == 1 and downlongtrend == 0 then {Exitshort("+¸¶°¨-¹«Ãß¼¼°¸Ç϶ô4%ÀÌ»ó±Þ¶ô05");} //if addsellclconcnt > 4 then // {Exitshort("+¸¶°¨-»ó½ÂÁ¶°Ç5ÀÌ»ó¹ß»ýû»ê07");} if //(V > V[1] * 1.5 or (V > V[1] and contbidaskcnt > 0 and C > O and C[1] > O[1])) addsellclconcnt > 0 and sto65d > sto65dL1 and sto65dL1 < stoL and sto130d > sto130dL1 and sto130dL1 < stoL and ( (Crossup(displp3,dispL) or (daylowdisplp3 < dispL and displp3 > dispL)) or (Crossup(simri,31) or (daylowsimri <= simL and simri > simL)) ) and sto10k > sto10d and sto20k > sto20k[1] then {Exitshort("+¸¶°¨-°ú³ÃÀÌÅõ½ºÅä»ó½Â09");} if dayhigh(0) < dayhigh(1) and daylow(0) > daylow(1) and dayhigh(0) < d2boxhigh and daylow(0) > d2boxlow and dayhigh(0) < d3boxhigh and daylow(0) > d3boxlow and dayhigh(0) < d4boxhigh and daylow(0) > d4boxlow and ((dayhigh(7) + Faddbox >= d4boxhigh and daylow(6) - Faddbox <= d4boxlow) or (dayhigh(6) + Faddbox >= d4boxhigh and daylow(7) - Faddbox <= d4boxlow)) and d4boxdep < depvaluemax and tboxdep < depvaluemid then {Exitshort("+¸¶°¨-¹Ú½º±Ç¼ö·ÅÇüÁÖÀÇ11");} /* if displp3[1] < dispL and sto65k < stoL and sto130k < stoL and sto20k > sto20dL1 and sto20d > sto20dL1 and sto20dL1 < stoL and sto20k > stoL and C < dayclose(1) * 0.98 and sto10k[1] > sto10d[1] then {Exitshort("+¸¶°¨-À̰ݰú³Ã½ºÅä»ó½Â12");} if stodL65or130Lcon == 1 and C > d7boxlow - depvaluemin and C < dayclose(1) * 0.96 and (Crossup(displp3,dispL) or (daylowdisplp3 < dispL and displp3 > dispL)) then {Exitshort("+¸¶°¨-°ú³ÃÀ̰ݽºÅä»ó½Â13");} if V > V[1] and clbartrend == 1 and !(sp < lp1 and lp1234dr < -1) then {Exitshort("+¸¶°¨-»ó½ÂÀüȯ14");} if V > V[1] and C > O and stok10n20Lcon == 1 and !(sto65down == 2 or sto130down == 2) and (!(sto65dh1 > stoh or sto65dh2 > stoh) or Crossup(displp3, dispL)) and ( ((daylow(0)[1] < d4boxlow or daylow(0) < d4boxlow) and C > d4boxlow) or ((daylow(0)[1] < d3boxlow or daylow(0) < d3boxlow) and C > d3boxlow) or ((daylow(0)[1] < d2boxlow or daylow(0) < d2boxlow) and C > d2boxlow)) then {Exitshort("+¸¶°¨-¹Ú½º±ÇÁöÁö16");} if V > V[1] and ((stok10n20Lcon == 1 and C > daylow(0)[1]) or clbartrend == 1 or upbidaskcon == 1) and !(lp0123dr < -1 or lp1234dr < 0 or sto65down1 == 2 or sto130down1 == 2) and boxshdownresist > 0 and upV >= 0.5 and (downupV > updownV1 or downupV > downupV1) then {Exitshort("+¸¶°¨-¹«Ãß¼¼¹Ú½º±ÇÁöÁö17");} if lp1234dr > -2 and !(sto65down == 2 or sto130down == 2) and ((sto10k[1] < stoL and sto20d > sto20dL1 and sto20dL1 < stoL) or clbartrend == 1 or upbidaskcon == 1) and boxcrdownresist > 0 then {Exitshort("+¸¶°¨-¹Ú½º±ÇÁöÁö18");} if !(lp0123dr < -1 or lp1234dr < 0) and sto10k < stoL and sto65d < stoh and boxcrdownresist > 0 and (sto65dL1 > sto65dL2 or sto130dL1 > sto130dL2) and !(sto65dh1bar < sto65dL1bar and sto65dh1 > stoh) then {Exitshort("+¸¶°¨-¹«Ãß¼¼¹Ú½º±ÇÁöÁö19");} if box7shdownresist > 0 and stodL10or20upcon == 1 and sto65d > sto65dL1 and sto65dL1 < stoL and C >= daylow(0)[1] and (sto10up > 1 or sto20up > 1 or upbidaskcon == 1) and (sto10k > sto10d or (sto10k > sto10k[1] and C > O)) then {Exitshort("+¸¶°¨-3~7ÀÏÀÌÀü¹Ú½º±ÇÁöÁö20");} if box7shdownresist > 0 and !(spnlp1234con < 0 and contgapcnt < 0) and !(downlongtrend == 1 and (borbfdownbidaskcon == 1 or entbartrend == -1 or clbartrend == -1)) then { if stodL65or130Lcon == 1 and sto65down1 <> 2 and stodh65or130hcon == 0 and (sto10up > 1 or sto20up > 1 or sto65up > 1 or stodL10n20upcon == 1) then {Exitshort("+¸¶°¨-3~7ÀÏÀÌÀü¹Ú½º±ÇÁöÁö21");} } if C >= daylow(1) and stok65or130Lcon == 1 and stodL10n20Lcon == 1 and sto65d > sto65dL1 and sto65dL1 < stoL and (sto10up > 1 or sto20up > 1) and (borbfupbidaskcon == 1) then {Exitshort("+¸¶°¨-½ºÅä½Ö¹Ù´Ú¹×È£ÀÜ»ó½Â¹ÝÀü22");} if contdowncnt == 3 and sto65k < stoL and stok10or20Lcon == 1 and C < dayclose(3) * 0.92 and !(C < dayclose(3) * 0.85 or C < dayclose(2) * 0.9 or C < dayclose(1) * 0.92) then {Exitshort("+¸¶°¨-8%ÀÌ»ó±Þ¶ôÈæ»ïº´°ú³Ã24");} if (lp1234dr > -1 or sto65k < stoL or lp123convercon == 1) and (!(sto65down == 2 or sto130down == 2) or (boxshdownresist + box7shdownresist > 4)) and !(bapdown == 2 and contbidaskcnt < 0) and stok10n20Lcon == 1 and C > d2boxlow - Faddbox and ((sto10k > sto10d or (sto10k > sto10k[1] and C > O)) or lp123convercon == 1) then {Exitshort("+¸¶°¨-¹Ú½º±ÇÁöÁö25");} if sto65k < stoL and stok10or20Lcon == 1 and stodL10or20upcon == 1 and ((sto10d > stoL and sto20d > stoL) or (sto65d > stoL and sto130d > stoL)) and ((sto20d > sto20dL1 or sto10d > sto10dL1) or sto20up1 > 1 or sto10up1 > 1) and yboxmid < dayopen(0) and dayhigh(1) >= dayhigh(0) and C >= daylow(1) - 1 and (!((V > daybgstvol and C < O) or ((V[1] > daybgstvol or V[1] > dayopenvol) and C[1] < O[1])) or (V > daybgstvol and C > O)) then {Exitshort("+¸¶°¨-¹Ú½º±ÇÁöÁö26");} if lp1234dr > -1 and dayhigh(0) < dayhigh(1) and daylow(0) > daylow(1) and stok10or20Lcon == 1 and lp123convercon == 1 then {Exitshort("+¸¶°¨-¹Ú½º±ÇÁöÁö27");} if sto65k > sto65d and boxshdownresist > 0 and box7shdownresist > 0 and d4boxdep < depvaluemax and C >= d4boxlow and stok10or20Lcon == 1 and stodL10or20Lcon == 1 and !((bidask < 0 and contbidaskcnt < 0) or dayclose(1) - C > depvaluemid) then {Exitshort("+¸¶°¨-¹Ú½º±ÇÁöÁö28");} if C >= d4boxlow and boxshdownresist > 0 and box7shdownresist > 1 and stok10n20Lcon == 1 and (lp123convercon == 1 and lp123gapmincon == 1) then {Exitshort("+¸¶°¨-¹Ú½º±ÇÁöÁö¹×ÀÌÆòÈ¥Á¶29");}// 08.10.20 ÀÛ¼º if (dayhigh(0) < d2boxhigh and daylow(0) > d2boxlow) and (dayhigh(0) < d3boxhigh and daylow(0) > d3boxlow) and (dayhigh(0) < d4boxhigh and daylow(0) > d4boxlow) then// 2008.1.28 Ãß°¡¶óÀÎ-1/29ÈÄ Àû¿ë°ËÅä { if sto65up2 == 2 and sto65k > sto65d and stok10or20Lcon == 1 then {Exitshort("+¸¶°¨-¼ö·ÅÇüÁÖÀÇû»ê31");} if lp3 > lp3[1] and lp3[1] > lp3[2] and lp4 > lp4[1] and lp4[1] > lp4[2] and sto65k > sto65d then {Exitshort("+¸¶°¨-¼ö·ÅÇüÁÖÀÇû»ê32");} } if !(downlongtrend == 1) and sto65k > sto65d then { if (dayhigh(0) < d2boxhigh and daylow(0) > d2boxlow) or (dayhigh(0) < d3boxhigh and daylow(0) > d3boxlow) or (dayhigh(0) < d4boxhigh and daylow(0) > d4boxlow) then// 2008.1.28 Ãß°¡¶óÀÎ-1/29ÈÄ Àû¿ë°ËÅä { if sto65up2 == 2 and stok10or20Lcon == 1 and !(sto65k > stoh or sto130k > stoh or displp3 > disph or simri >= simh) then {Exitshort("+¸¶°¨-¹«Ãß¼¼ÀϺÀ½ºÅä½Ö¹Ù´ÚÁÖÀÇ33");} } if lp123convercon == 1 and !(spmpnlpdupcon == -1 and mplpnlp12dupcon == -1 and contbidaskcnt < 0) then { if !((C < lp1 and C < lp2 and C < lp3 and lp1 < lp1[1] and lp2 < lp2[1] and lp3 < lp3[1]) or (C < lp1 and C < lp2 and C < lp3 and C < lp4 and lp2 < lp2[1] and lp3 < lp3[1] and lp4 < lp4[1])) then {Exitshort("+¸¶°¨-¹«Ãß¼¼ÀÌÆò¼±¼ö·ÅÁÖÀÇ34");} } } if lp123convercon == 1 and !(spmpnlpdupcon == -1 and contbidaskcnt < 0) then { if stok10n20Lcon == 1 and C >= d2boxlow - 0.5 and !(sto65k < sto65d and index < sto65index + 24) and (sto65k > sto65d or lpshdownresist > 0 or boxshdownresist > 0 or box7shdownresist > 0) then {Exitshort("+¸¶°¨-ÀÌÆò¼±¼ö·ÅÁÖÀÇ35");} } if C > O and daylow(0) >= daylow(1) and stok65n130Lcon == 1 and stodL10n20Lcon == 1 and spdupcon == 1 and contbidaskcnt > 0 then {Exitshort("+¸¶°¨-½ºÅä°ú³Ã±Ç5½Ö¹Ù´Ú36");} if sto65k < stoL and sto130k < stoL and displp3 < dispL and simri <= simL and stodL10n20Lcon == 1 and sto10k > stoL and sto20k > stoL and sto20k > sto20d and (sto65up == 2 or sto130up == 2 or sto65d > sto65dL1 or sto130d > sto130dL1) and !(sto65down2 == 2 or sto130down2 == 2 or borbfdownbidaskcon == 1 or bgstvolcon == 1 or bgstdownVcon == 1)then {Exitshort("+¸¶°¨-ÀÌÅõ°ú³Ã±Ç½ºÅä»ó½Â37");} if ( sto65k < stoL and ((displp3 < 90 and stok10or20Lcon == 1) or (displp3 < dispL and stok10n20Lcon == 1 and ((sto65down1 <> 2 and sto130down1 <> 2) or sto65k < stoL or sto130k < stoL))) ) or (sto65k > stoL and stok10n20Lcon == 1 and contgapcnt < 0) and !(C < dayclose(3) * 0.85 or C < dayclose(2) * 0.9 or C < dayclose(1) * 0.92) then { if (lp1234dr > -1 or boxshdownresist > 0 or box7shdownresist > 0 or (stok10n20Lcon == 1 and displp3 < dispL and simri < simL and sto65k > stoL and sto130k > stoL)) and !(dayhigh(0) < d5boxlow + Faddbox) then { if downlongtrend > 0 then { if C < dayclose(4) * 0.92 then {Exitshort("+¸¶°¨-4ÀÏÀüºñ8%ÀÌ»ó±Þ¶ô42");} if C < dayclose(3) * 0.94 then {Exitshort("+¸¶°¨-3ÀÏÀüºñ6%ÀÌ»ó±Þ¶ô42");} if C < dayclose(2) * 0.96 then {Exitshort("+¸¶°¨-2ÀÏÀüºñ4%ÀÌ»ó±Þ¶ô42");} if C < dayclose(1) * 0.96 then {Exitshort("+¸¶°¨-ÀüÀϺñ4%ÀÌ»ó±Þ¶ô42");} } else if !(downlongtrend == 1) then { if C < dayclose(4) * 0.92 then {Exitshort("+¸¶°¨-¹«Ãß¼¼4ÀÏÀüºñ8%ÀÌ»ó±Þ¶ô42");} if C < dayclose(3) * 0.94 then {Exitshort("+¸¶°¨-¹«Ãß¼¼3ÀÏÀüºñ6%ÀÌ»ó±Þ¶ô42");} if C < dayclose(2) * 0.96 then {Exitshort("+¸¶°¨-¹«Ãß¼¼2ÀÏÀüºñ4%ÀÌ»ó±Þ¶ô42");} if C < dayclose(1) * 0.96 then {Exitshort("+¸¶°¨-¹«Ãß¼¼ÀüÀϺñ4%ÀÌ»ó±Þ¶ô42");} } } else if sto65k < stoL and sto130k < stoL and !(bar6dep < depvaluemin1 and bar6dep < Fdepvaluemin) then { if C < dayclose(4) * 0.90 then {Exitshort("+¸¶°¨-4ÀÏÀüºñ10%ÀÌ»ó±Þ¶ô43");} if C < dayclose(3) * 0.91 then {Exitshort("+¸¶°¨-3ÀÏÀüºñ9%ÀÌ»ó±Þ¶ô43");} if C < dayclose(2) * 0.92 then {Exitshort("+¸¶°¨-2ÀÏÀüºñ8%ÀÌ»ó±Þ¶ô43");} if C < dayclose(1) * 0.94 then {Exitshort("+¸¶°¨-ÀüÀϺñ6%ÀÌ»ó±Þ¶ô43");} } } if !(lp0123dr < 0 or lp1234dr < 0) and lp1crdownresist== 1 and upV >= 0.4 and upV > downV1 and upV > upV1 then {Exitshort("+¸¶°¨-¹«Ãß¼¼5Àϼ±ÁöÁö44");} if V > V[1] and ((stok10or20Lcon == 1 and C > daylow(0)[1]) or clbartrend1 == 1 or upbidaskcon == 1) and !(lp0123dr < -1 or lp1234dr < 0 or sto65down1 == 2 or sto130down1 == 2) and upV >= 0.5 and (upV > daybgstupV and upV > daybgstdownV) then { if lp2shdownresist == 1 then {Exitshort("+¸¶°¨-¹«Ãß¼¼10Àϼ±ÁöÁö45");} if lp3shdownresist == 1 then {Exitshort("+¸¶°¨-¹«Ãß¼¼20Àϼ±ÁöÁö45");} if lp4shdownresist == 1 then {Exitshort("+¸¶°¨-¹«Ãß¼¼60Àϼ±ÁöÁö45");} } if !(downlongtrend == 1 or lp0123dr < -1) and lpshdownresist > 0 and daylow(1) - C < depvaluemin and C >= daylow(0)[1] and (sto10up > 1 or sto20up > 1 or stodL10n20Lcon == 1) then {Exitshort("+¸¶°¨-¹«Ãß¼¼ÀÌÆò¼±ÁöÁö46");} if (C > d2boxlow or sto65k > sto65d or (V > V[1] and (lp1234dr > -2 or stodL10or20Lcon == 1)) or (sto65d > sto65dL1 and sto65dL1 < stoL)) and displp3[1] < dispL and simri <= simL and ( (sto65k < stoL and (stok10n20Lcon == 1 or (sto65k > sto65k[1] and stok10or20Lcon == 1))) or (sto65k > sto65d and (sto10k[1] < stoL or sto10k < stoL)) ) and bar6dep > depvaluemin1 and (sto10k > sto10d or (sto10k > sto10k[1] and C > O)) and addsellclconcnt99 > 0 then {Exitshort("+¸¶°¨-ÀÌÅõ°ú³Ã½ºÅä»ó½Â55");} if V > V[1] and displp3[1] < 90 and sto65k < stoL and stok10or20Lcon == 1 and upV >= 1 and upV > downV1 and upV > upV1 and (sto10k > sto10d or (sto10k > sto10k[1] and C > O)) and addsellclconcnt99 > 0 then {Exitshort("+¸¶°¨-À̰ݰú³Ã½ºÅä»ó½Â56");} if daylow(0) >= d4boxlow and dayhigh(0) <= d4boxhigh and (boxshdownresist > 0 and box7shdownresist > 0) and (sto20k[1] < stoL or sto10k[1] < stoL) and stodL10or20Lcon == 1 and (sto65d[1] < stoL or sto130d[1] < stoL or displp3[1] < stoL) and dayhigh(0) > yboxmid and addsellclconcnt99 > 0 then {Exitshort("+¸¶°¨-°ú³Ã½ºÅä»ó½Â78");} if ((sto65k > sto65d and sto65dL1 < stoL) or (sto130k > sto130d and sto130dL1 < stoL) or displp3[1] < stoL) and daylow(0) >= d4boxlow - depvaluemin and dayhigh(0) <= d4boxhigh and !((downlongtrend == 1 and sp < lp1 and bar6dep <= depvaluemin1) or (lp1234dr < 0 and sp < lp1)) and addsellclconcnt99 > 0 then { if ((boxshdownresist > 1 or box7shdownresist > 1) and stodL10or20upcon == 1) or ((boxshdownresist > 0 or box7shdownresist > 0) and stok10n20Lcon == 1 and stodL10or20Lcon == 1) then {Exitshort("+¸¶°¨-°ú³Ã½ºÅä»ó½Â79");} } if lp1234dr > -2 and !(lp1 <= lp4 and lp4 <= lp4[1]) and (V > dayopenvol or V[1] > dayopenvol) and addsellclconcnt99 > 0 then { if lp1234dr > -1 and lp0123dr < -1 and sto20k[1] < stoL and ((sto65k < stoL and (sto10k[1] < stoL and sto10k > sto10d)) or (!(sp < lp3 and sp < lp4) and sto10k > sto10dL1 and sto10dL1 < stoL)) and !(dayhigh(0) < daylow(1) and C <= dayopen(0) and (sto65down == 2 or sto130down == 2 or sto65down1 == 2 or sto130down1 == 2) and sto65k > stoL) then {Exitshort("+¸¶°¨-¹«Ãß¼¼°ú³Ã½ºÅä»ó½Â96");} } //if ((C - entryprice(0) > entryprice(0) * Flosscutrate) // or (C - dayclose(1) > dayclose(1) * Flosscutrate and lp1234dr > -1)) and C > O then // {Exitshort("+¸¶°¨-¼ÕÀý¸Åû»ê99");} if notsellclgrd < 3 then { { if lp1234dr > 0 and C >= d4boxlow - Faddbox and C > lp2 and (sto65up2 == 2 or sto130up2 == 2) and displp3 > disph then {Exitshort("+¸¶°¨-¿ªÃß¼¼¹Ú½º±ÇÁöÁö41");} if downlongtrend == 0 and lpshdownresist > 0 and (boxshdownresist > 1 or box7shdownresist > 1) and (sto10d > sto10dL1 or sto20d > sto20dL1) and !(sto65down == 2 or sto130down == 2 or stodh65or130hcon == 1) then {Exitshort("+¸¶°¨-¹«Ãß¼¼ÀÌÆò¼±¹×¹Ú½º±ÇÁöÁö42");} if sto65k < stoL and sto130k < stoL and sto20k[1] < stoL and addsellclconcnt > 1 and contbidaskcnt > 1 then { if lp2shdownresist == 1 then {Exitshort("+¸¶°¨-10Àϼ±ÁöÁö43");} if lp3shdownresist == 1 then {Exitshort("+¸¶°¨-20Àϼ±ÁöÁö43");} if lp4shdownresist == 1 then {Exitshort("+¸¶°¨-60Àϼ±ÁöÁö43");} } if !(downlongtrend == 1 and lp4 > lp3) and !(lp1 < lp4 and lp2 < lp4 and lp3 < lp4) and V > V[1] and C > O and stok10n20Lcon == 1 and lp123convercon == 1 and (boxshdownresist > 0 or box7shdownresist > 0) and sto10k > sto10d then {Exitshort("+¸¶°¨-¹«Ãß¼¼¹Ú½º±ÇÁöÁöÀÌÆò¼±È¥Á¶45");} if lp1234dr > -1 and stok10n20Lcon == 1 and V > V[1] and C > O and sto10k > sto10d and ((C[1] > O[1] and V[1] > V[2]) or downlongtrend == 0) and ((boxshdownresist > 0 and box7shdownresist > 0) or (sto20k > sto20d and addsellclconcnt > 2)) and addsellclconcnt99 > 0 then {Exitshort("+¸¶°¨-°ú³Ã½ºÅä»ó½Â46");} } if (lp1234dr > -2 or C > d2boxlow or sto65k > sto65d or stodL10or20Lcon == 1 or sto65d > sto65dL1) and displp3[1] < dispL and sto65k < stoL and stok10or20Lcon == 1 and sto20k > sto20d and (sto10k > sto10d or (sto10k > sto10k[1] and C > O)) and sto10d > sto10dL1 and sto10dL1 < stoL and addsellclconcnt99 > 0 then {Exitshort("+¸¶°¨-À̰ݰú³Ã½ºÅä»ó½Â58");} if lp1234dr > -2 and !(lp1 <= lp4 and lp4 <= lp4[1]) and addsellclconcnt99 > 0 then { if lp1234dr == -1 and sto65k < stoL and sto20k[1] < stoL //and sto10k > sto10d and (sto10k[1] < stoL or sto10up1) and !(contgapcnt < 0 and dayopen(0) < d4boxlow) //and (lp1234gapmidcon == 1 or (lp1 > lp4 and lp > lp4 and lp4 > lp4[1])) and ((dayopen(0) > daylow(1) and dayopen(0) > daylow(2)) or (dayopen(0) > daylow(2) and dayopen(0) > daylow(3))) then {Exitshort("+¸¶°¨-°ú³Ã½ºÅä»ó½Â59");} if (displp3[1] < dispL or simri <= simL) and sto20k[1] < stoL and sto10k > stoL and sto10k > sto10dL1 and sto10dL1 < stoL and sto65k > sto65dL1 and contgapcnt < 0 then {Exitshort("+¸¶°¨-°ú³Ã½ºÅä»ó½Â60");} if !(lp1234dr < 0 or lp0123dr < -2) and !(lp1234dr > 0 or lp0123dr > 2) and bfdayuplpcnt > 5 and bfdayuplp4cnt > 5 and stok10n20Lcon == 1 and sto10k > sto10k[1] and contgapcnt < 0 //and bar6dep > Fdepvaluemin and (addsellclcon > 0 or C < dayclose(1) * 0.98) and !(sto65k[1] > stoh or sto130k[1] > stoh) then {Exitshort("+¸¶°¨-¹«Ãß¼¼°ú³Ã½ºÅä»ó½Â61");} } if V > V[1] and sto65k < stoL and sto20k[1] < stoL and ((sto10k[1] < stoL and sto10k > sto10d) or sto10up1 > 1) and sp > sp[1] and ((upV >= 0.5 and upV > downV1 and upV > upV1 and V[1] > V[2]) or (upV >= 0.3 and upbidaskcon == 1) or (V > V[1] * 1.5 and upV >= 0.5 and upV > downV1 and upV > upV1 and C > lp)) and addsellclconcnt99 > 0 then {Exitshort("+¸¶°¨-°ú³Ã½ºÅä»ó½Â62");} if V > V[1] and sto65k < stoL and stok10n20Lcon == 1 and sto10k > sto10k[1] and !(C < lp3 and C < lp4) and ((C[1] >= O[1] and V[1] > V[2] and upV >= Faddbox) or (sp > sp[1] and upV >= 0.3) or (upV >= 0.3 and V > V[1]*1.2) or (C[1] < O[1] and V[1] > V[2]*1.2 and V > vp and upV >= 0.5)) and addsellclconcnt99 > 0 then {Exitshort("+¸¶°¨-°ú³Ã½ºÅä»ó½Â64");} } */ } } //########## ---------- ¸Å¼öû»ê ---------- ##########// // ¸Å¼ö Routine°ú ´Ù¸¥ ºÎºÐÀÌ ÀÖÀ¸³ª ÀÌ´Â ÀÚ¿¬¿ø¸®(Áß·ÂÀÇ ¹ýÄ¢)»ó ´ç¿¬ÇÑ °ÍÀÓ // marketposition() == [1 = ¸Å¼ö, 0 = ¹« Æ÷Áö¼Ç, -1 = ¸Åµµ] if marketposition() == 1 then if notbuyclgrd == 0 or (C < daylow(1) - Faddbox and !(lp0123dr > 0 or uplongtrend > 0)) then if (sto65k > sto65d and (C < lp1 or lp1234dr < 1)) or (sto65k < sto65d and ((C < lp1 and lp1234dr < 1) or (contbidaskcnt < -1 and bidask[3] < 0 and bgstvolcon == 1 and bgstdownVcon == 1 and downV > depvaluemin1))) or ((sto65down == 2 or sto130down == 2) and (C < lp1 or C < daylow(1))) then if !(((sto65up == 2 and sto130up1 == 2) or (sto65up1 == 2 and sto130up == 2)) and C > lp1 and C >= daylow(0)[1] and (sto10down < 2 and sto20down < 2) and C >= yboxmid and tboxdep < depvaluemin1) then { if C < O and C < sp and sp < sp[1] and C < C[1] and (H < H[1] or C < L[1]) then if (C[1] <= O[1] or (C < O[1] and C < O[2] and (downV >= Faddbox or C <= C[1] - Faddbox))) then if dayindex() < 12 then if upbidaskcon == 0 or dayindex() == 0 then { { if sto10k < sto10k[1] then { if !(dayindex() == 0 and (C >= dayclose(1) or lp1 >= lp1[1])) then { if lph1 < lph2 and lp < lp[1] and sph1 < sph2 and sph1 < lph1 and sp < lp then { {Exitlong("-520º¹ÇÕÇ϶ôN");} } if mph1 < mph2 and mp < mp[1] and sph1 < sph2 and sph1 < mph1 and sp < mp then { {Exitlong("-510º¹ÇÕÇ϶ôN");} } if sph1 < sph2 and sph1 < lp and lp < lp[1] and sp < lp then { {Exitlong("-520Ç϶ôN");} } if downhb5con == 1 and sp[3] <= lp and sp < sph1 and lp < lp[1] and sp < lp then { {Exitlong("-520Ç϶ôȾº¸");} } if lph1 < lph2 and lp < lp[1] and lph1 <= lp1 and lp1 < lp1[1] and C < lp and lp < lp1 then { {Exitlong("-2060Ç϶ôN");} } if downhb20con == 1 and lp[3] <= lp1 and lp < lph1 and lp < lp[1] and lp1 < lp1[1] and C < lp and lp < lp1 then { {Exitlong("-2060Ç϶ôȾº¸");} } if lph1 < lph2 and C < lp and lp < lp[1] and lph1 <= lp2 and lp2 < lp2[1] and C < lp and lp < lp2 then { {Exitlong("-20120Ç϶ôN");} } if downhb20con == 1 and lp[3] <= lp2 and lp < lph1 and lp < lp[1] and lp2 < lp2[1] and C < lp and lp < lp2 then { {Exitlong("-20120Ç϶ôȾº¸");} } if mph1 < mph2 and mp < mp[1] and mph1 <= lp and lp < lp[1] and C < lp and C < mp and mp < lp then { {Exitlong("-1020Ç϶ôN");} } if downhb10con == 1 and mp[3] <= lp and mp < mph1 and mp < mp[1] and lp < lp[1] and C < lp and C < mp and mp < lp then { {Exitlong("-1020Ç϶ôȾº¸");} } if mph1 < mph2 and mp < mp[1] and mph1 <= lp1 and lp1 < lp1[1] and C < lp and C < mp and mp < lp1 then { {Exitlong("-1060Ç϶ôN");} } if downhb10con == 1 and mp[3] <= lp1 and mp < mph1 and mp < mp[1] and lp1 < lp1[1] and C < lp and C < mp and mp < lp1 then { {Exitlong("-1060Ç϶ôȾº¸");} } //if lp1h1 - 0.1 < lph2 and C < lp then // { // {Exitlong("-20½ÖºÀ");} // } //if mph1 < mph2 and C < lp then // { // {Exitlong("-10½ÖºÀ");} // } if (((lp0123dr > 1 or lp1234dr > 0) and sph1 < sph2 + 0.1) or (!(lp0123dr > 1 or lp1234dr > 0) and sph1 < sph2 + Faddbox)) and C < lp then { {Exitlong("-5½ÖºÀ");} } if !(lp0123dr > 1 or lp1234dr > 0) and downhb5con == 1 and downV > 0.5 and V > V[1] and C < lp and (downV > daybgstupV or downV > daybgstdownV or clbartrend == -1 or downbidaskcon == 1) then {Exitlong("-5Ç϶ôȾº¸");} if downhb5con == 1 and (sp < lp or sp < mp) and lp < lp[1] and C < lp and C < lp1 and clbartrend == -1 and downV >= 0.4 and downV1 >= 0.4 and C < daylow(0)[1] then {Exitlong("-5Ç϶ôȾº¸1");} } if H < mp and C < lp and downV >= Faddbox then { if (lp < lp[1] or (dayopen(0) < daylow(1) and C < daylow(1))) Then { {Exitlong("-10ÀÌÆò¹Ø");} } } } } } } if marketposition() == 1 then if notbuyclgrd == 0 then if !(lp1234dr == 2 and C > lp1 - Faddbox and d2boxdep <= depvaluemin3 and C >= d2boxlow) then { if C < O and C < L[1] and O >= sp and O >= lp and C < sp and C < lp and H - L > H[1] - L[1] then { if downV >= 0.5 and sto10k < sto10d and !(lp > lp[1] and lp1 > lp1[1] and lp > lp1) then { if dayindex() < 12 Then { if upbidaskcon == 0 or dayindex() == 0 then { {Exitlong("-ÀåÀ½ºÀ");} } } } } } // ---------- ½ºÅä ½ÖºÀ½Ã ¸Å¼ö û»ê ·çƾ ---------- // if marketposition() == 1 then if dayindex() < 12 and C < O and C < C[1] then if notstodowncon == 0 and stodowncon > 0 then { if dayindex() > 0 and sto20k < sto20d - 0.5 and sto20k < sto20k[1] and (lp1234dr < 2 or sto20k[1] < sto20k[2]) and (sto10k < sto10d or (V > V[1] and V[1] > V[2])) then { if sto20index + 5 >= index or stime >= 140000 then { if sto20dh1 < stoh and sto20dh1 + 3 < sto20dh2 and stok20h1 + 3 < stok20h2 then { if stodowncon > 0 then {Exitlong("-sto20d-");} else {Exitlong("-sto20d-99");} } { if stok20h1 < stok20h2 and stod20h1 + 3 < stod20h2 and notbuyclgrd < 2 then { if stodowncon > 0 then {Exitlong("-sto20d-¹Ú½º±Ç-");} else {Exitlong("-sto20d-¹Ú½º±Ç-99");} } } } if sto20kh1 + 3 < sto20kh2 and sto20kh1 < sto20d[sto20kh1bar] and sto20kh1bar < 5 and sto20k < stoh then { if stodowncon > 0 then {Exitlong("-sto20k-");} else {Exitlong("-sto20k-99");} } } if sto10k < sto10d - 0.5 and sto10k < sto10k[1] and (sto20k < stoh or lp0123dr < 1 or clbartrend == -1) and (lp1234dr < 2 or sto10k[1] < sto10k[2])then { if sto10index + 5 >= index or stime >= 140000 then { if sto10dh1 < stoh and sto10dh1 + 3 < sto10dh2 and stok10h1 + 3 < stok10h2 then { if stodowncon > 0 then {Exitlong("-sto10d-");} else {Exitlong("-sto10d-99");} } { if stok10h1 < stok10h2 and stod10h1 + 3 < stod10h2 and notbuyclgrd < 2 then { if stodowncon > 0 then {Exitlong("-sto10d-¹Ú½º±Ç-");} else {Exitlong("-sto10d-¹Ú½º±Ç-99");} } } } } } /* // ---------- ¸¶°¨ ½Ã°£¿¡ ºÀÆÄµ¿¿¡ µû¸¥ ¸Å¼ö¿À¹ö ¶Ç´Â û»ê¿©ºÎ °áÁ¤ ·çƾ ---------- // if marketposition() == 1 then if dayindex() == 11 Then { if (C >= dayclose(1) * 1.097 or H >= dayclose(1) * 1.097) and (dayclose(1) > dayclose(2) * 1.05 or (lp < lp1 and (lp < lp[1] or stodh10or20hcon == 1))) then {Exitlong("-¸¶°¨-»óÇѰ¡Ã»»ê01");} else if !(C > dayclose(1) * 1.08 and dayclose(1) < dayclose(2) * 1.08) or sto65k < sto65d or C < lp1 or (((sto20down > 2 and (sto10down > 1 or sto10d < sto10dh1)) or (sto10down > 2 and (sto20down > 1 or sto20d < sto20dh1))) and ((sto65up < 2 and sto130up < 2) or sto65k > stoh or sto130k > stoh)) then { if contgapcnt > 2 then {Exitlong("-¸¶°¨-¾²¸®°¸»ó½Âû»ê02");} if contgapcnt > 1 and (C > dayclose(4) * 1.08 or C > dayclose(2) * 1.04) and sto65k > stoh and stok10n20hcon == 1 then {Exitlong("-¸¶°¨-Åõ°¸»ó½Â4%ÀÌ»ó±Þµî03");} if C < O and contbidaskcnt < 0 and contgapcnt > 0 and (C > dayclose(4) * 1.08 or C > dayclose(2) * 1.04) and sto65k > stoh and stok10n20hcon == 1 and uplongtrend == 0 then {Exitlong("-¸¶°¨-¹«Ãß¼¼°¸»ó½Â4%ÀÌ»ó±Þµî05");} if (uplongtrend == 0 or lp1234dr < 1) and C > daylow(0) * 1.06 and !(sto65k < stoL and sto65d < stoL and sto130k < stoL and sto130d < stoL) then {Exitlong("-¸¶°¨-¹«Ãß¼¼ÀÏÁßÀúÁ¡´ëºñ6%ÀÌ»ó±Þµî07");} if lp1234dr < 1 and stok10n20hcon == 1 and (boxshupresist > 0 or box7shupresist > 1) and lp123convercon == 1 and (sto65k < sto65d or sto130k < sto130d) and C < d7boxhigh and (sto65down2 == 2 or sto130down2 == 2) and (C > dayclose(1) * 1.04 or C <= d4boxhigh) and !(borbfupbidaskcon == 1) then {Exitlong("-¸¶°¨-¹«Ãß¼¼ÀϺÀ½ºÅäÇ϶ôÀÌÆòÈ¥Á¶09");} if stok10n20hcon == 1 and lp1 < lp2 and lp1 < lp3 and lp1 < lp4 and !(sto65up == 2 or sto130up == 2) and (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.05) then { if downlongtrend > 0 then {Exitlong("-¸¶°¨-¿ªÃß¼¼5%ÀÌ»ó±Þµî½ºÅä°ú¿­10");} else if !(lp0123dr > 0 or lp1234dr > 0) then {Exitlong("-¸¶°¨-¹«Ãß¼¼5%ÀÌ»ó±Þµî½ºÅä°ú¿­10");} else {Exitlong("-¸¶°¨-5%ÀÌ»ó±Þµî½ºÅä°ú¿­10");} } if sto20k[1] > stoh and !(lp1234dr == 2 or (lp1234dr == 1 and lp3 > lp4)) and C < O and C[1] < O[1] and V > V[1] and downV > downV1 and dayhigh(0) > d7boxhigh and C <= d7boxhigh and (boxshupresist > 0 or box7shupresist > 0) and (bapdown == 2 or borbfdownbidaskcon == 1) and sto65d < sto65dh1 then {Exitlong("-¸¶°¨-¹Ú½º±ÇÀúÇ×¹×È£ÀÜÇ϶ô¹ÝÀü11");} if contupcnt == 3 and upgapcon == 1 and C > dayclose(3) * 1.07 and displp3 > disph and simri >= simh and sto65k > stoh and stok10n20hcon == 1 then {Exitlong("-¸¶°¨-7%ÀÌ»ó±ÞµîÀû»ïº´°ú¿­21");} if V > V[1] and sto65k < stoh and sto20k[1] > stoh and sto10k[1] > stoh and sto10k < sto10k[1] and (sto20d < sto20dh1 or sto10d < sto10dh1) and C < O and C < C[1] and boxcrupresist > 0 and bfdaydownlpcnt > 4 and (contgapcnt == 0 or dayopen(0) < d2boxhigh) and displp3 < disph and simri < simh then {Exitlong("-¸¶°¨-¹Ú½º±ÇÀúÇ×22");} if lp1234dr < 2 and V > V[1] and C < O and C < C[1] and (sto65k > stoh or sto130k > stoh) and (sto10d < sto10dh1 and sto20d < sto20dh1) and C <= dayhigh(1) and yboxmid - tboxmid < depvaluemin and tboxdep > depvaluemin and downV > daybgstupV and contbidaskcnt < 0 then {Exitlong("-¸¶°¨-¹Ú½º±ÇÀúÇ×23");} if downlongtrend > 0 and stok10or20hcon == 1 and stodh10or20downcon == 1 and ((lpshupresist > 0 and (boxshupresist > 0 or box7shupresist > 0)) or (boxshupresist > 1 and box7shupresist > 1)) and !(sto65up == 2 or sto130up == 2 or stodL65n130Lcon == 1) then {Exitlong("-¸¶°¨-¿ªÃß¼¼ÀÌÆò¹×¹Ú½º±ÇÀúÇ×24");} if sto65k < sto65d and sto130k < sto130d and displp3 > disph and !(sto65up2 == 2 or sto130up2 == 2) then { if boxshupresist > 0 and box7shupresist > 0 and d4boxdep < depvaluemax and C <= d4boxhigh and !((bidask > 0 and contbidaskcnt > 0) or C - dayclose(1) > depvaluemid) then {Exitlong("-¸¶°¨-ÀϺÀ½ºÅäÇ϶ôÁß¹Ú½º±ÇÀúÇ×33");} if (dayhigh(2) > dayhigh(1) and dayhigh(2) > dayhigh(0) and daylow(2) < daylow(1) and daylow(2) < daylow(0)) then {Exitlong("-¸¶°¨-ÀϺÀ½ºÅäÇ϶ôÁß¹Ú½º±Ç¼ö·Å34");} { if (d3boxhigh >= dayhigh(1) and d3boxhigh >= dayhigh(0) and d3boxlow <= daylow(1) and d3boxlow <= daylow(0)) or (d4boxhigh >= dayhigh(1) and d4boxhigh >= dayhigh(0) and d4boxlow <= daylow(1) and d4boxlow <= daylow(0)) then {Exitlong("-¸¶°¨-ÀϺÀ½ºÅäÇ϶ôÁß¹Ú½º±Ç¼ö·Å35");} } } if lp123convercon == 1 then { if stok10n20hcon == 1 and C <= d2boxlow + 0.5 then {Exitlong("-¸¶°¨-ÀÌÆò¼±¼ö·ÅÁÖÀÇ36");} } if C < O and lp1234dr < 2 and C < lp4 and lp4 < lp4[1] and tboxmid - yboxmid < depvaluemin and (yboxmid - y2boxmid < depvaluemin or ((sto10down > 1 or sto20down > 1) and contbidaskcnt < 0)) and C <= dayhigh(1) and sto10d < sto10dh1 and sto20d < sto20dh1 and sto65d < sto65dh1 and tboxdep > 1 then {Exitlong("-¸¶°¨-»ó½ÂºÎÁøÃ»»ê37");} if lp1 < lp1[1] and lp1[1] < lp1[2] and lp < lp1 and !(lp0123dr > 1 or uplongtrend > 0 or sto65up== 2 or sto130up == 2 or stodL65or130Lcon == 1) and (boxshupresist > 0 or box7shupresist > 0) and (bapdown == 2 or contbidaskcnt < 0) then {Exitlong("-¸¶°¨-¹«Ãß¼¼È£ÀÜÇ϶ô38");} if lp1234dr > 0 and stok65n130hcon == 1 and displp3 > stoh and simri >= simh and stodh10n20hcon== 1 and sto65d > stoh and sto130d > stoh and sto10k > 70 and sto20k > 70 and dayhigh(0)[1] <= dayhigh(1) and C[1] < dayhigh(0)[1] and C < dayhigh(1) + depvaluemin1 then {Exitlong("-¸¶°¨-ÀÌÅõ°ú¿­½ºÅäÇ϶ô39");}// 08.12.02 ÀÛ¼º if lp123convercon == 1 and lp1234dr > 0 and simri >= simh and sto65k > stoh and stok10n20hcon == 1 and sto10k < sto10d then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-4%ÀÌ»ó±Þµî½ºÅä°ú¿­46");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ46");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô46");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×46");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×46");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿46");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®46");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ46");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-°ú¿­½ºÅäÇ϶ô46");} } if stok10n20hcon == 1 and lp1 < lp2 and lp1 < lp3 and lp1 < lp4 and !(sto65up == 2 or sto130up == 2) and ((C < lp2 and C < lp3 and C < lp4) or (lp1 < lp1[1] and lp1[1] < lp1[2] and sp < lp4 and lp4 < lp4[1])) then { if downlongtrend > 0 then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-¿ªÃß¼¼4%ÀÌ»ó±Þµî½ºÅä°ú¿­48");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ48");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô48");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×48");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×48");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿48");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®48");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ48");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-¿ªÃß¼¼°ú¿­½ºÅäÇ϶ô48");} } else if !(lp0123dr > 0 or lp1234dr > 0) then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-¹«Ãß¼¼4%ÀÌ»ó±Þµî½ºÅä°ú¿­48");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ48");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô48");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×48");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×48");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿48");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®48");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ48");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼°ú¿­½ºÅäÇ϶ô48");} } } if !(lp0123dr > 1 or lp1234dr > 0) and stok10n20hcon == 1 and (boxshupresist > 1 and box7shupresist > 1 and lpshupresist > 0) and lp1 < lp2 and lp2 < lp3 and lp3 < lp4 //and !(sp > lp1 and lp1 > lp1[1] and lp1[1] > lp1[2]) and contgapcnt < 1 and sto65up1 <> 2 and sto130up1 <> 2 and sto20up1 < 3 then {Exitlong("-¸¶°¨-¹«Ãß¼¼ÀÌÆò¼±¹×¹Ú½º±ÇÀúÇ×70");} //if ((entryprice(0) - C > entryprice(0) * Flosscutrate) // or (dayclose(1) - C > dayclose(1) * Flosscutrate and lp1234dr < 1)) and C < O then // {Exitlong("-¸¶°¨-¼ÕÀý¸Åû»ê99");} if C <= O or buyclupdowncon == 1 or (bidask < bidask[1] and bidask[1] < bidask[2]) then { if notbuyclgrd < 2 or forcedbuyclcon > 0 then { if dayhigh(0) <= d4boxhigh + Faddbox and (entbartrend < 0 or clbartrend < 0) and stok65n130hcon == 1 and stodh10or20hcon == 1 and C < lp and (borbfdownbidaskcon == 1) and ( (Crossdown(displp3,disph) or (dayhighdisplp3 > disph and displp3 < disph)) or (Crossdown(simri,69) or (dayhighsimri >= simh and simri < simh)) ) then {Exitlong("-¸¶°¨-ÀÌÅõ°ú¿­±ÇÈ£ÀÜÇ϶ô¹ÝÀü23");}// 08. 12.08 ÀÛ¼º if (stok65n130hcon == 1 and displp3 > disph and sto65k < sto65d and sto20k < sto20d and C < lp and (downhb5con == 1 or downhb10con == 1 or downhb20con == 1) and C < yboxmid) then {Exitlong("-¸¶°¨-°ú¿­ÀÌÅõ½ºÅäÇ϶ô24");}// 08. 12.07 ÀÛ¼º if !(lp0123dr > 1 or uplongtrend > 0) and lpshupresist > 0 and lpshupresist[1] > 0 and V > V[1] and C < O and C[1] < O[1] and stok10n20hcon == 1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼ÀÌÆò¼±ÀúÇ×25");}// 08. 10.17 ÀÛ¼º if V > V[1] and ((stok10or20hcon == 1 and C < dayhigh(0)[1]) or clbartrend1 == -1 or downbidaskcon == 1) and !(lp0123dr > 1 or lp1234dr > 0 or sto65up1 == 2 or sto130up1 == 2) and downV >= 0.5 and (downV > daybgstupV and downV > daybgstdownV) then { if lp2shupresist == 1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼10Àϼ±ÀúÇ×51");} else if lp3shupresist == 1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼20Àϼ±ÀúÇ×51");} else if lp4shupresist == 1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼60Àϼ±ÀúÇ×51");} } if (entbartrend == -1 or clbartrend == -1) and uplongtrend == 0 then {Exitlong("-¸¶°¨-¹«Ãß¼¼Ç϶ôºÀÆÄµ¿53");} if (Crossdown(displp3,disph) or (displp3 < disph and dayhighdisplp3 > disph)) and sto65k > stoh and sp < sp[1] and (((sto20k[1] > stoh and (sto10k[1] > stoh or (contgapcnt > 0 and (lp1234dr < 2 or displp3 > disph or C < daylow(0)[1])))) and downV > daybgstupV) or (sto65k < sto65d and sto65k < sto65dh1 and sto65dh1 > stoh and sto10k[1] > stoh)) then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-4%ÀÌ»ó±ÞµîÀ̰ݽºÅä°ú¿­54");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-À̰ݽºÅä°ú¿­±Ç½ºÅä½ÖºÀ54");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-À̰ݽºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô54");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-À̰ݽºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×54");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-À̰ݽºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×54");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-À̰ݽºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿54");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-À̰ݽºÅä°ú¿­±ÇÀå´ë°Å·¡·®54");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-À̰ݽºÅä°ú¿­±ÇÀå´ëÀ½ºÀ54");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-À̰ݰú¿­½ºÅäÇ϶ô54");} } if V > V[1] and (sto65k > stoh or clbartrend == -1 or downbidaskcon == 1) and sto20k[1] > stoh and (sto10k[1] > stoh or sto10k[2] > stoh) and sp < sp[1] and downV >= 0.5 and downV > daybgstupV and downV > upV1 and V > V[1] and V[1] > V[2] then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-4%ÀÌ»ó±Þµî½ºÅä°ú¿­55");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ55");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô55");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×55");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×55");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿55");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®55");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ55");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-°ú¿­½ºÅäÇ϶ô55");} } if lp1234dr > 0 and displp3 > 104 and simri >= simh and sto65k > stoh and stok10n20hcon == 1 and sto20k < sto20k[1] and (sto10k < sto10d or (sto10k < sto10k[1] and C < O)) then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-4%ÀÌ»ó±ÞµîÀÌÅõ½ºÅä°ú¿­56");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ56");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô56");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×56");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×56");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿56");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®56");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ56");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-ÀÌÅõ°ú¿­½ºÅäÇ϶ô56");} } if V > V[1] and !(lp0123dr > 1 or lp1234dr > 0) and sto65k > stoh and stok10n20hcon == 1 and sto20k < sto20d and sto10k < sto10d and sp < sp[1] then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-4%ÀÌ»ó±Þµî½ºÅä°ú¿­57");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ57");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô57");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×57");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×57");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿57");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®57");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ57");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-°ú¿­½ºÅäÇ϶ô57");} } if V > V[1] and (lpshupresist > 0 or boxshupresist > 0 or box7shupresist > 0) and stok10n20hcon == 1 and sp < sp[1] then { if downlongtrend > 0 then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-¿ªÃß¼¼4%ÀÌ»ó±Þµî½ºÅä°ú¿­58");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ58");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô58");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×58");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×58");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿58");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®58");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-¿ªÃß¼¼½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ58");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-¿ªÃß¼¼°ú¿­½ºÅäÇ϶ô58");} } if !(lp0123dr > 1 or uplongtrend > 0) then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-¹«Ãß¼¼4%ÀÌ»ó±Þµî½ºÅä°ú¿­58");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ58");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô58");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×58");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×58");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿58");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®58");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ58");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-¹«Ãß¼¼°ú¿­½ºÅäÇ϶ô58");} } } if C < O and C < C[1] and sto65k < sto65dh1 and stok10n20hcon == 1 and (borbfdownbidaskcon == 1) and dayopen(0) < d4boxhigh and tboxmid < d4boxhigh then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-4%ÀÌ»ó±Þµî½ºÅä°ú¿­59");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ59");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô59");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×59");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×59");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿59");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®59");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ59");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-°ú¿­½ºÅäÇ϶ô59");} } if (lp1234dr < 2 or V > daybgstvol or sto65k < sto65d) and C < O and C < C[1] and sto65k > stoh and sto10k[1] > stoh and clbartrend == -1 and boxshupresist > 0 then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-4%ÀÌ»ó±Þµî½ºÅä°ú¿­60");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ60");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô60");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×60");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×60");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿60");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®60");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ60");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-°ú¿­½ºÅäÇ϶ô60");} } if V > V[1] and displp3 > disph and sto65k > stoh and boxcrupresist > 0 and downV > daybgstupV and downV >= 0.5 and sto10k < sto10d then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-4%ÀÌ»ó±Þµî½ºÅä°ú¿­62");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ62");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô62");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×62");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×62");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿62");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®62");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ62");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-°ú¿­½ºÅäÇ϶ô62");} } } if V > V[1] and displp3 > 106 and simri >= simh and sto65k > stoh and (stok10n20hcon == 1 or (stok10or20hcon == 1 and V > dayopenvol)) then { if (C > dayclose(4) * 1.1 or C > dayclose(2) * 1.07 or C > dayclose(1) * 1.04) then {Exitlong("-¸¶°¨-4%ÀÌ»ó±ÞµîÀÌÅõ½ºÅä°ú¿­63");} if sto10down > 1 or sto20down > 1 then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±Ç½ºÅä½ÖºÀ63");} if (borbfdownbidaskcon == 1 or (bidask < 0 and bapdown == 2 and contbidaskcnt < 0)) then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±ÇÈ£ÀÜÇ϶ô63");} if lpshupresist > 0 then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±ÇÀÌÆò¼±ÀúÇ×63");} if boxshupresist > 0 or box7shupresist > 0 then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±Ç¹Ú½º±ÇÀúÇ×63");} if entbartrend == -1 or clbartrend == -1 or clbartrend == -1 then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±ÇÇ϶ôºÀÆÄµ¿63");} if bgstvolcon == 1 or (dayindex() > 0 and V > V[1] * 1.5 and V > vp) then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±ÇÀå´ë°Å·¡·®63");} if bgstdownVcon == 1 or downV > depvaluemin1 then {Exitlong("-¸¶°¨-ÀÌÅõ½ºÅä°ú¿­±ÇÀå´ëÀ½ºÀ63");} if lp1234dr < 2 and (sto20k[1] > stoh or sto10k[1] > stoh) and stodh10or20hcon == 1 then {Exitlong("-¸¶°¨-ÀÌÅõ°ú¿­½ºÅäÇ϶ô63");} } } } } */ // ----- ¸Å¼ö±ÝÁö, ¸Åµµ±ÝÁö, ¸Å¼öû»ê±ÝÁö, ¸ÅµµÃ»»ê±ÝÁö ·çƾ °ËÁõ ¹øÈ£ ·Î±ë ------// // ----- ½Ç Àû¿ëÀº Â÷Æ®»ó ¹®Á¦°¡ ÀÖÀ» °æ¿ì, Å×½ºÆ®ÇÒ °æ¿ì¸¸ ÇÏ°í Æò¼Ò¿¡´Â ¸·¾ÆµÑ °Í ------// //MessageLog("%.0f, %.0f, %.0f",notbuycon, notbuyregcon, notbuybetcon); //Alert("%.0f, %.0f, %.0f",notbuycon, notbuyregcon, notbuybetcon) /* if date < currentdate() or stime + 3000 < currenttime() or stime + 2999 == currenttime() or stime + 1000 == currenttime() or stime + 2000 == currenttime() then //if int(FracPortion(Time/10000)*100) == int(FracPortion(currentTime()/10000)*100) then { Print("30ºÐ-Tb.txt", ", ÇöÀç½Ã°£ %.0f, ºÀ½ÃÀ۽ð£ %.0f, ºÀ³¡½Ã°£ %.0f, %.0f, %.0f, %.0f", Currenttime(), stime, time, Fline, Fline, Fline); Print("30ºÐ-Tb.txt", ", notbuy %.0f, reg %.0f, bet %.0f, buymin %.0f, buyreg %.0f, buybet %.0f", notbuycon, notbuyregcon, notbuybetcon, buymincon, buyregcon, buybetcon); Print("30ºÐ-Tb.txt", ", notsell %.0f, reg %.0f, bet %.0f, sellmin %.0f, sellreg %.0f, sellbet %.0f", notsellcon, notsellregcon, notsellbetcon, sellmincon, sellregcon, sellbetcon); Print("30ºÐ-Tb.txt", ", forcedbuy %.0f, sell %.0f, buycl %.0f, sellcl %.0f, notbuycl %.0f, sellcl %.0f", forcedbuycon, forcedsellcon, forcedbuyclcon, forcedsellclcon, notbuyclcon, notsellclcon); Print("30ºÐ-Tb.txt", ", entbartrend %.0f, cL %.0f, cL1 %.0f, lp1dupcon %.0f, addbuyclcnt %.0f, sell %.0f", entbartrend, clbartrend, clbartrend1, lp1dupcon, addbuyclconcnt, addsellclconcnt); Print("30ºÐ-Tb.txt", ", bgstvol %.0f, upV %.0f, downV %.0f, spmpdup %.0f, splpdup %.0f, mplpdup %.0f", bgstvolcon, bgstupVcon, bgstdownVcon, spmpdupcon, splpdupcon, mplpdupcon); Print("30ºÐ-Tb.txt", ", uplongtend %.0f, down %.0f, spnlp1234 %.0f, mplpnlp12dup %.0f, bapup %.0f, bapdown %.0f", uplongtrend, downlongtrend, spnlp1234con, mplpnlp12dupcon, bapup, bapdown); Print("30ºÐ-Tb.txt", ", lp1234dr %.0f, 123 %.0f, 0123 %.0f, 234 %.0f, 124 %.0f, 134 %.0f", lp1234dr, lp123dr, lp0123dr, lp234dr, lp124dr, lp134dr); Print("30ºÐ-Tb.txt", ", lp123conver %.0f, 1234 %.0f, box %.0f, lp1234gapmin %.0f, 123 %.0f, 234 %.0f", lp123convercon, lp1234convercon, boxconvercon, lp1234gapmincon, lp123gapmincon, lp234gapmincon); Print("30ºÐ-Tb.txt", ", lpcrup %.0f, down %.0f, shup %.0f, down %.0f, lpcrupcon %.0f, down %.0f", lpcrupresist, lpcrdownresist, lpshupresist, lpshdownresist, lpcrupcon, lpcrdowncon); Print("30ºÐ-Tb.txt", ", boxshup %.0f, down %.0f, box7shup %.0f, down %.0f, sellcldownup %.0f, buy %.0f", boxshupresist, boxshdownresist, box7shupresist, box7shdownresist, sellcldownupcon, buyclupdowncon); Print("30ºÐ-Tb.txt", ", depvaluemin %.2f, min1 %.2f, min3 %.2f, mid %.2f, mid1 %.2f, max %.2f", depvaluemin, depvaluemin1, depvaluemin3, depvaluemid, depvaluemid1, depvaluemax); Print("30ºÐ-Tb.txt", ", bar12dep %.2f, high %.2f, low %.2f, bar6dep %.2f, high %.2f, low %.2f", bar12dep, bar12high, bar12low, bar6dep, bar6high, bar6low); Print("30ºÐ-Tb.txt", ", bar12dep[1] %.2f, high %.2f, low %.2f, bar6dep[1] %.2f, high %.2f, low %.2f", bar12dep[1], bar12high[1], bar12low[1], bar6dep[1], bar6high[1], bar6low[1]); Print("30ºÐ-Tb.txt", ", dayupVcnt %.0f, sum %.2f, avg %.2f, daydownVcnt %.0f, sum %.2f, avg %.2f", dayupVcnt, dayupVsum, dayupVavg, daydownVcnt, daydownVsum, daydownVavg); Print("30ºÐ-Tb.txt", ", forcedstoup %.0f, not %.0f, stoup %.0f, forcedstodown %.0f, not %.0f, stodown %.0f", forcedstoupcon, notstoupcon, stoupcon, forcedstodowncon, notstodowncon, stodowncon); Print("30ºÐ-Tb.txt", ", sto10up %.0f, up1 %.0f, up2 %.0f, 10down %.0f, down1 %.0f, down2 %.0f", sto10up, sto10up1, sto10up2, sto10down, sto10down1, sto10down2); Print("30ºÐ-Tb.txt", ", sto20up %.0f, up1 %.0f, up2 %.0f, 20down %.0f, down1 %.0f, down2 %.0f", sto20up, sto20up1, sto20up2, sto20down, sto20down1, sto20down2); Print("30ºÐ-Tb.txt", ", sto65up %.0f, up1 %.0f, up2 %.0f, 65down %.0f, down1 %.0f, down2 %.0f", sto65up, sto65up1, sto65up2, sto65down, sto65down1, sto65down2); Print("30ºÐ-Tb.txt", ", sto130up %.0f, up1 %.0f, up2 %.0f, 130down %.0f, down1 %.0f, down2 %.0f", sto130up, sto130up1, sto130up2, sto130down, sto130down1, sto130down2); Print("30ºÐ-Tb.txt", ", stok10n20L %.0f, or %.0f, k10n20h %.0f, or %.0f, dL10n20L %.0f, or %.0f", stok10n20Lcon, stok10or20Lcon, stok10n20hcon, stok10or20hcon, stodL10n20Lcon , stodL10or20Lcon); Print("30ºÐ-Tb.txt", ", dL10n20up %.0f, or %.0f, dh10n20down %.0f, or %.0f, dh10n20h %.0f, or %.0f", stodL10n20upcon, stodL10or20upcon, stodh10n20downcon, stodh10or20downcon, stodh10n20hcon, stodh10or20hcon); Print("30ºÐ-Tb.txt", ", stok65n130L %.0f, or %.0f, k65n130h %.0f, or %.0f, dL65n130L %.0f, or %.0f", stok65n130Lcon, stok65or130Lcon, stok65n130hcon, stok65or130hcon, stodL65n130Lcon, stodL65or130Lcon); Print("30ºÐ-Tb.txt", ", dL65n130up %.0f, or %.0f, dh65n130down %.0f, or %.0f, dh65n130h %.0f, or %.0f", stodL65n130upcon, stodL65or130upcon, stodh65n130downcon, stodh65or130downcon, stodh65n130hcon, stodh65or130hcon); Print("30ºÐ-Tb.txt", ", sto10dL1 %.2f, dL2 %.2f, dL3 %.2f, 10dh1 %.2f, dh2 %.2f, dh3 %.2f", sto10dL1, sto10dL2, sto10dL3, sto10dh1, sto10dh2, sto10dh3); //Print("30ºÐ-Tb.txt", ", sto10kL1 %.2f, kL2 %.2f, kL3 %.2f, 10kh1 %.2f, kh2 %.2f, kh3 %.2f", //sto10kL1, sto10kL2, sto10kL3, sto10kh1, sto10kh2, sto10kh3); //Print("30ºÐ-Tb.txt", ", stod10L1 %.2f, L2 %.2f, L3 %.2f, 10h1 %.2f, h2 %.2f, h3 %.2f", //stod10L1, stod10L2, stod10L3, stod10h1, stod10h2, stod10h3); //Print("30ºÐ-Tb.txt", ", stok10L1 %.2f, L2 %.2f, L3 %.2f, 10h1 %.2f, h2 %.2f, h3 %.2f", //stok10L1, stok10L2, stok10L3, stok10h1, stok10h2, stok10h3); Print("30ºÐ-Tb.txt", ", sto20dL1 %.2f, dL2 %.2f, dL3 %.2f, 20dh1 %.2f, dh2 %.2f, dh3 %.2f", sto20dL1, sto20dL2, sto20dL3, sto20dh1, sto20dh2, sto20dh3); //Print("30ºÐ-Tb.txt", ", sto20kL1 %.2f, kL2 %.2f, kL3 %.2f, 20kh1 %.2f, kh2 %.2f, kh3 %.2f", //sto20kL1, sto20kL2, sto20kL3, sto20kh1, sto20kh2, sto20kh3); //Print("30ºÐ-Tb.txt", ", stod20L1 %.2f, L2 %.2f, L3 %.2f, 20h1 %.2f, h2 %.2f, h3 %.2f", //stod20L1, stod20L2, stod20L3, stod20h1, stod20h2, stod20h3); //Print("30ºÐ-Tb.txt", ", stok20L1 %.2f, L2 %.2f, L3 %.2f, 20h1 %.2f, h2 %.2f, h3 %.2f", //stok20L1, stok20L2, stok20L3, stok20h1, stok20h2, stok20h3); Print("30ºÐ-Tb.txt", ", lp1h1 %.2f, h2 %.2f, lp1L1 %.2f, L2 %.2f, sto130dh1 %.2f, dh2 %.2f", lp1h1, lp1h2, lp1L1, lp1L2, sto130dh1, sto130dh2); Print("30ºÐ-Tb.txt", ", sto65dL1 %.2f, dL2 %.2f, sto65dh1 %.2f, dh2 %.2f, sto130dL1 %.2f, dL2 %.2f", sto65dL1, sto65dL2, sto65dh1, sto65dh2, sto130dL1, sto130dL2); Print("30ºÐ-Tb.txt", ", tdep %.2f, ydep %.2f, tmid %.2f, ymid %.2f, dayhigh(0)[1] %.2f, low(0)[1] %.2f", tboxdep, yboxdep, tboxmid, yboxmid, dayhigh(0)[1], daylow(0)[1]); Print("30ºÐ-Tb.txt", ", d2boxdep %.2f, high %.2f, low %.2f, d3boxdep %.2f, high %.2f, low %.2f", d2boxdep, d2boxhigh, d2boxlow, d3boxdep, d3boxhigh, d3boxlow); Print("30ºÐ-Tb.txt", ", d4boxdep %.2f, high %.2f, low %.2f, d5boxdep %.2f, high %.2f, low %.2f", d4boxdep, d4boxhigh, d4boxlow, d5boxdep, d5boxhigh, d5boxlow); Print("30ºÐ-Tb.txt", ", d6boxdep %.2f, high %.2f, low %.2f, d7boxdep %.2f, high %.2f, low %.2f", d6boxdep, d6boxhigh, d6boxlow, d7boxdep, d7boxhigh, d7boxlow); Print("30ºÐ-Tb.txt", ", tupV %.2f, tdownV %.2f, downupV %.2f, updownV %.2f, Crossdown %.0f, upfailure10 %.0f", tupV, tdownV, downupV, updownV, Crossdown520con, upfailure10con); Print("30ºÐ-Tb.txt", ", sph1 %.2f, h2 %.2f, spL1 %.2f, L2 %.2f, mph1 %.2f, h2 %.2f", sph1, sph2, spL1, spL2, mph1, mph2); Print("30ºÐ-Tb.txt", ", mpL1 %.2f, L2 %.2f, lph1 %.2f, h2 %.2f, lpL1 %.2f, L2 %.2f", mpL1, mpL2, lph1, lph2, lpL1, lpL2); Print("30ºÐ-Tb.txt", ", uphb5con %.0f, 10 %.0f, 20 %.0f, downhb5con %.0f, 10 %.0f, 20 %.0f", uphb5con, uphb10con, uphb20con, downhb5con, downhb10con, downhb20con); Print("30ºÐ-Tb.txt", ", upbidask %.0f, bf %.0f, downbidask %.0f, bf %.0f, contbidaskcnt %.0f, barcnt %.0f", upbidaskcon, bfupbidaskcon, downbidaskcon, bfdownbidaskcon, contbidaskcnt, contbarcnt); //Print("30ºÐ-Tb.txt", ", sto10dL1 %.2f, dL2 %.2f, dL3 %.2f, sto10dh1 %.2f, dh2 %.2f, dh3 %.2f", //sto10dL1, sto10dL2, sto10dL3, sto10dh1, sto10dh2, sto10dh3); ///Print("30ºÐ-Tb.txt", ", sto20dL1 %.2f, dL2 %.2f, dL3 %.2f, sto20dh1 %.2f, dh2 %.2f, dh3 %.2f", //sto20dL1, sto20dL2, sto20dL3, sto20dh1, sto20dh2, sto20dh3); } */