커뮤니티

수식부탁드립니다------------

프로필 이미지
leekss1
2011-03-20 18:45:23
748
글번호 36714
답변완료
Period(0),maP(0),map6(0),N(0),Tr1(0),Tr2(0),진입(000),ADXP(0),Per1(0),X1(0); Var : value(0); var2 = adx(adxP); value = ma(bids,period)-ma(asks,period); #최근 X봉 동안 최고값이 최저값대비 per%이상 큼 Condition1 = highest(h,x1) >= lowest(L,x1)*(1+(Per1/100)); if stime >= 093000 and stime < 144500 and var2 >=10 then { if value > value[1]+진입 and ma(C,map) >= ma(C,map)[1]+N and ma(C,9) >= ma(C,9)[1] and Condition1 Then buy(); if value < value[1]-진입 and ma(C,map) <= ma(C,map)[1]-N and ma(C,9) <= ma(C,9)[1] and Condition1 Then Sell(); SetStopLoss(PriceScale*30,PointStop); #SetStopProfittarget(PriceScale*45,PointStop); if Condition1 == true Then{ if MarketPosition == 1 Then{ ExitLong("15b절",AtStop,EntryPrice-PriceScale*30); ExitLong("bx5",AtLimit,EntryPrice+PriceScale*20); } if MarketPosition == -1 Then{ ExitShort("15s절",AtStop,EntryPrice+PriceScale*30); ExitShort("sx5",AtLimit,EntryPrice-PriceScale*20); } } if Condition1 == false Then{ if MarketPosition == 1 Then{ if Highest(H,BarsSinceEntry) < EntryPrice+1 Then ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-tr1); Else ExitLong("bx2",AtStop,Highest(H,BarsSinceEntry)-tr2); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-1 Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+tr1); Else ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+tr2); } } #단기이평청산---------------------- #if MarketPosition == 1 and ma(C,5) < ma(C,5)[1]-0.25 Then # ExitLong(); #if MarketPosition == -1 and ma(C,5) > ma(C,5)[1]+0.25 Then # ExitShort(); //시간청산-------------------- var11 = int(date/100)-int(date/10000)*100; //월 var22 = date - int(date/100)*100; //일 var33 = DayOfWeek(date); //요일 if var11%3 == 0 and var22 >= 8 and var22 <= 14 and var33 == 4 then { SetStopEndofday(144800); //만기날 } else { SetStopEndofday(150100); //평일 } } 항상감사합니다 당일중 현재가의 0.05%손실나면 당일매매 금지하게해주세요
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2011-03-21 14:46:19

안녕하세요 예스스탁입니다. 질문의 내용을 명확히 하셔서 올려주시기 바랍니다. 최종 수신받는 데이터가 항상 현재가입니다. 현재가의 0.05%가 어떤 값을 의도하시는지 모르겠습니다. 즐거운 하루되세요 > leekss1 님이 쓴 글입니다. > 제목 : 수식부탁드립니다------------ > Period(0),maP(0),map6(0),N(0),Tr1(0),Tr2(0),진입(000),ADXP(0),Per1(0),X1(0); Var : value(0); var2 = adx(adxP); value = ma(bids,period)-ma(asks,period); #최근 X봉 동안 최고값이 최저값대비 per%이상 큼 Condition1 = highest(h,x1) >= lowest(L,x1)*(1+(Per1/100)); if stime >= 093000 and stime < 144500 and var2 >=10 then { if value > value[1]+진입 and ma(C,map) >= ma(C,map)[1]+N and ma(C,9) >= ma(C,9)[1] and Condition1 Then buy(); if value < value[1]-진입 and ma(C,map) <= ma(C,map)[1]-N and ma(C,9) <= ma(C,9)[1] and Condition1 Then Sell(); SetStopLoss(PriceScale*30,PointStop); #SetStopProfittarget(PriceScale*45,PointStop); if Condition1 == true Then{ if MarketPosition == 1 Then{ ExitLong("15b절",AtStop,EntryPrice-PriceScale*30); ExitLong("bx5",AtLimit,EntryPrice+PriceScale*20); } if MarketPosition == -1 Then{ ExitShort("15s절",AtStop,EntryPrice+PriceScale*30); ExitShort("sx5",AtLimit,EntryPrice-PriceScale*20); } } if Condition1 == false Then{ if MarketPosition == 1 Then{ if Highest(H,BarsSinceEntry) < EntryPrice+1 Then ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-tr1); Else ExitLong("bx2",AtStop,Highest(H,BarsSinceEntry)-tr2); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-1 Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+tr1); Else ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+tr2); } } #단기이평청산---------------------- #if MarketPosition == 1 and ma(C,5) < ma(C,5)[1]-0.25 Then # ExitLong(); #if MarketPosition == -1 and ma(C,5) > ma(C,5)[1]+0.25 Then # ExitShort(); //시간청산-------------------- var11 = int(date/100)-int(date/10000)*100; //월 var22 = date - int(date/100)*100; //일 var33 = DayOfWeek(date); //요일 if var11%3 == 0 and var22 >= 8 and var22 <= 14 and var33 == 4 then { SetStopEndofday(144800); //만기날 } else { SetStopEndofday(150100); //평일 } } 항상감사합니다 당일중 현재가의 0.05%손실나면 당일매매 금지하게해주세요
프로필 이미지

회원

2011-09-29 07:43:40

관리자님에 의해 삭제된 답변입니다.