커뮤니티

부탁드립니다.

프로필 이미지
묘선낭자
2014-01-10 11:51:48
171
글번호 71242
답변완료
항상 감사합니다. 1. 20이평분에 해당하는 다이버전스 매매 (1)경우1 data1은 저점변곡점을 낮췄는데 data3은 고점변곡점을 낮추면(고점 낮춘 쌍봉) 매수 data1은 고점변곡점을 높였는데 data2은 고점변곡점을 낮추면(고점 낮춘 쌍봉) 매도 (2)경우2 data1은 저점변곡점을 낮췄는데 data3은 고점변곡점을 맞추면(고점 동일한 쌍봉) 매수 data1은 고점변곡점을 높였는데 data2은 고점변곡점을 맞추면(고점 동일한 쌍봉) 매도 (3)경우3 data1은 저점변곡점을 맞췄는데(저점동일쌍바닥) data3은 고점변곡점을 낮추면(고점 낮춘 쌍봉) 매수 data1은 고점변곡점을 맞췄는데(고점동일쌍봉) data2은 고점변곡점을 낮추면(고점 낮춘 쌍봉) 매도 위에 대한 시스템식을 부탁드립니다. 이것을 시스템식이 아닌 지표식이나 강조식으로도 가능한지요. 가능하다면 함께 부탁드립니다. 2. 3계약 분할진입(물타기) A>B이면 1계약 매수, 2P 익절(1계약) 익절 전 1P 물리면 1계약 추가매수, 평균단가에서 0.2P이내로 오면 2계약 손절(계약당0.2P손절) 손절 전 1P 더 물리면(평균단가에서 1.5P 물리면) 1계약 추가매수, 평균단가+0.30에 3계약 익절 청산(계약당 0.3P 익절) A<B이면 1계약 매도 다음수순은 매수와 같음 당일종가청산 위와같은 의도로 다음과 같이 만들어봤으나 첫번째 진입과 그 1계약 익절, 익절되지 않았을 경우 2번째 진입까지는 실현되나 2번째 청산, 3번째 진입과 청산이 안 되네요. 부탁드립니다. (...def,1)은 뭐고 (,,,def,1,1)은 뭔지, 일괄청산때도 숫자를 써줘야 하는지. 부탁해요 ㅠㅠ condition1=marketposition==1 and Isentryname("b1")==true; condition2=marketposition==1 and Isentryname("b1")==true and Isentryname("b2")==true; condition3=marketposition==1 and Isentryname("b1")==true and Isentryname("b2")==true and Isentryname("b3")==true; condition4=marketposition==-1 and Isentryname("s1")==true; condition5=marketposition==-1 and Isentryname("s1")==true and Isentryname("s2")==true; condition6=marketposition==-1 and Isentryname("s1")==true and Isentryname("s2")==true and Isentryname("s3")==true; If A>B Then{ Buy("b1",onclose,def,1); } If condition1==True and condition2==false Then{ Exitlong("bx1",atlimit,Entryprice+2); Buy("b2",atlimit,entryprice-1,1); } If condition2==True and condition3==false Then{ Exitlong("bx2",atlimit,AvgEntryprice-0.20); Buy("b3",atlimit,Avgentryprice-1.50,1); } If condition3==true then{ Exitlong("bx3",atlimit,AvgEntryprice+0.30); } If A<B Then{ Sell("s1",onclose,def,1); } If condition4==True and condition5==false Then{ Exitshort("sx1",atlimit,Entryprice-2,def,1); Sell("s2",atlimit,entryprice+1,1); } If condition5==True and condition6==false Then{ Exitshort("sx2",atlimit,AvgEntryprice+0.20); Sell("s3",atlimit,Avgentryprice+1.5,1); } If condition6==true Then{ Exitshort("sx3",atlimit,AvgEntryprice-0.30); } Setstopendofday(151500);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-01-10 15:53:48

안녕하세요 예스스탁입니다. 1. input : left(3),Right(3); var : HH11(0,data1),HH12(0,data1); var : LL11(0,data1),LL12(0,data1); var : HH21(0,data1),HH22(0,data1); var : LL21(0,data1),LL22(0,data1); var : HH31(0,data1),HH32(0,data1); var : LL31(0,data1),LL32(0,data1); #Data2 고점 if data2(SwingHigh(1,H,Left,right,Left+Right+1)) != -1 Then{ HH21 = data2(H[Right]); HH22 = HH21[1]; } #Data2 저점 if data2(SwingLow(1,L,Left,right,Left+Right+1)) != -1 Then{ LL11 = data2(L[Right]); LL12 = LL11[1]; } #Data3 고점 if data3(SwingHigh(1,H,Left,right,Left+Right+1)) != -1 Then{ HH31 = data3(H[Right]); HH32 = HH31[1]; } #Data3 저점 if data3(SwingLow(1,L,Left,right,Left+Right+1)) != -1 Then{ LL31 = data3(L[Right]); LL32 = LL31[1]; } #data1 고점 if data1(SwingHigh(1,H,Left,right,Left+Right+1)) != -1 Then{ HH11 = data1(H[Right]); HH12 = HH11[1]; if HH11 > HH12 and HH21 < HH22 and HH12 > 0 and HH22 > 0 Then sell("매도1"); if HH11 > HH12 and HH21 == HH22 and HH12 > 0 and HH22 > 0 Then sell("매도2"); if HH11 == HH12 and HH21 < HH22 and HH12 > 0 and HH22 > 0 Then sell("매도3"); } #Data1 저점 if data1(SwingLow(1,L,Left,right,Left+Right+1)) != -1 Then{ LL11 = data1(L[Right]); LL12 = LL11[1]; if LL11 < LL12 and HH31 < HH32 and LL12 > 0 and HH32 > 0 Then buy("매수1"); if LL11 < LL12 and HH31 == HH32 and LL12 > 0 and HH32 > 0 Then buy("매수2"); if LL11 == LL12 and HH31 < HH32 and LL12 > 0 and HH32 > 0 Then buy("매수3"); } 2. 일괄청산 할때는 따로 수량 지정 필요가 없습니다. 아래식 참고하시기 바랍니다. if MarketPosition <= 0 and A > B Then buy("b1",OnClose,def,1); if MarketPosition == 1 Then{ if MaxEntries == 1 Then{ exitlong("bx1",atlimit,EntryPrice+2); buy("b2",atlimit,EntryPrice-1); } if MaxEntries == 2 Then{ exitlong("bx2",AtLimit,AvgEntryPrice-0.2); buy("b3",atlimit,EntryPrice-2); } if MaxEntries == 3 Then{ exitlong("bx3",AtLimit,AvgEntryPrice+0.3); } } if MarketPosition <= 0 and A < B Then sell("s1",OnClose,def,1); if MarketPosition == -1 Then{ if MaxEntries == 1 Then{ ExitShort("sx1",atlimit,EntryPrice-2); Sell("s2",atlimit,EntryPrice+1); } if MaxEntries == 2 Then{ ExitShort("sx2",AtLimit,AvgEntryPrice+0.2); sell("s3",atlimit,EntryPrice+2); } if MaxEntries == 3 Then{ ExitShort("sx3",AtLimit,AvgEntryPrice-0.3); } } Setstopendofday(151500); 즐거운 하루되세요 > 묘선낭자 님이 쓴 글입니다. > 제목 : 부탁드립니다. > 항상 감사합니다. 1. 20이평분에 해당하는 다이버전스 매매 (1)경우1 data1은 저점변곡점을 낮췄는데 data3은 고점변곡점을 낮추면(고점 낮춘 쌍봉) 매수 data1은 고점변곡점을 높였는데 data2은 고점변곡점을 낮추면(고점 낮춘 쌍봉) 매도 (2)경우2 data1은 저점변곡점을 낮췄는데 data3은 고점변곡점을 맞추면(고점 동일한 쌍봉) 매수 data1은 고점변곡점을 높였는데 data2은 고점변곡점을 맞추면(고점 동일한 쌍봉) 매도 (3)경우3 data1은 저점변곡점을 맞췄는데(저점동일쌍바닥) data3은 고점변곡점을 낮추면(고점 낮춘 쌍봉) 매수 data1은 고점변곡점을 맞췄는데(고점동일쌍봉) data2은 고점변곡점을 낮추면(고점 낮춘 쌍봉) 매도 위에 대한 시스템식을 부탁드립니다. 이것을 시스템식이 아닌 지표식이나 강조식으로도 가능한지요. 가능하다면 함께 부탁드립니다. 2. 3계약 분할진입(물타기) A>B이면 1계약 매수, 2P 익절(1계약) 익절 전 1P 물리면 1계약 추가매수, 평균단가에서 0.2P이내로 오면 2계약 손절(계약당0.2P손절) 손절 전 1P 더 물리면(평균단가에서 1.5P 물리면) 1계약 추가매수, 평균단가+0.30에 3계약 익절 청산(계약당 0.3P 익절) A<B이면 1계약 매도 다음수순은 매수와 같음 당일종가청산 위와같은 의도로 다음과 같이 만들어봤으나 첫번째 진입과 그 1계약 익절, 익절되지 않았을 경우 2번째 진입까지는 실현되나 2번째 청산, 3번째 진입과 청산이 안 되네요. 부탁드립니다. (...def,1)은 뭐고 (,,,def,1,1)은 뭔지, 일괄청산때도 숫자를 써줘야 하는지. 부탁해요 ㅠㅠ condition1=marketposition==1 and Isentryname("b1")==true; condition2=marketposition==1 and Isentryname("b1")==true and Isentryname("b2")==true; condition3=marketposition==1 and Isentryname("b1")==true and Isentryname("b2")==true and Isentryname("b3")==true; condition4=marketposition==-1 and Isentryname("s1")==true; condition5=marketposition==-1 and Isentryname("s1")==true and Isentryname("s2")==true; condition6=marketposition==-1 and Isentryname("s1")==true and Isentryname("s2")==true and Isentryname("s3")==true; If A>B Then{ Buy("b1",onclose,def,1); } If condition1==True and condition2==false Then{ Exitlong("bx1",atlimit,Entryprice+2); Buy("b2",atlimit,entryprice-1,1); } If condition2==True and condition3==false Then{ Exitlong("bx2",atlimit,AvgEntryprice-0.20); Buy("b3",atlimit,Avgentryprice-1.50,1); } If condition3==true then{ Exitlong("bx3",atlimit,AvgEntryprice+0.30); } If A<B Then{ Sell("s1",onclose,def,1); } If condition4==True and condition5==false Then{ Exitshort("sx1",atlimit,Entryprice-2,def,1); Sell("s2",atlimit,entryprice+1,1); } If condition5==True and condition6==false Then{ Exitshort("sx2",atlimit,AvgEntryprice+0.20); Sell("s3",atlimit,Avgentryprice+1.5,1); } If condition6==true Then{ Exitshort("sx3",atlimit,AvgEntryprice-0.30); } Setstopendofday(151500);