커뮤니티

문의 드립니다.

프로필 이미지
호시우보
2018-05-31 22:30:41
212
글번호 119403
답변완료
아래식 수정 부탁합니다. 정확하게 매도쪽에 피라미딩 신호가 적용되지가 않습니다, 또한, 매 진입단가별로 +1.0 수익에서 익절하는 식은 어떻게 하는지요..? 감사합니다. var1 = ma(C,20); # 매도/매수 1회로 제한 var : count(0),cnt(0); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } if count < 1 and stime >= 100000 and stime < 153000 and crossup(c,var1) Then buy(); //진입신호 바로 다음봉에서 가격조건만족시 신호발생을 위한 매수함수 buy("b1",AtStop,c+0.3,1); buy("b2",AtStop,c+0.5,1); if MarketPosition == 1 Then{ ExitLong("bx",atlimit,AvgEntryPrice+1.0); //진입신호 다음다음봉부터 가격조건만족시 신호발생을 위한 매수함수 if highest(H,BarsSinceEntry) < EntryPrice+0.3 Then buy("b1.",AtStop,EntryPrice+0.3,1); if highest(H,BarsSinceEntry) < EntryPrice+0.5 Then buy("b2.",AtStop,EntryPrice+0.5,1); if count < 1 and stime >= 100000 and stime < 153000 and CrossDown(c,var1) Then sell(); //진입신호 바로 다음봉에서 가격조건만족시 신호발생을 위한 매도함수 sell("s1",AtStop,c-0.3,1); sell("s2",AtStop,c-0.5,1); if MarketPosition == -1 Then{ ExitShort("sx",AtLimit,AvgEntryPrice-1.0); //진입신호 다음다음봉부터 가격조건만족시 신호발생을 위한 매도함수 if Lowest(L,BarsSinceEntry) > EntryPrice-0.3 then sell("s1.",AtStop,EntryPrice-0.3,1); if Lowest(L,BarsSinceEntry) > EntryPrice-0.5 then sell("s2.",AtStop,EntryPrice-0.5,1); }} //0.3 0.5에 한개씩 파라미딩...평균진입가 +1.0에서 청산
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-06-01 17:47:57

var1 = ma(C,20); # 매도/매수 1회로 제한 var : count(0),cnt(0); count = 0; for cnt = 0 to 20 { if sdate == EntryDate(cnt) Then count = count+1; } if count < 1 and stime >= 100000 and stime < 153000 and crossup(c,var1) Then { buy(); //진입신호 바로 다음봉에서 가격조건만족시 신호발생을 위한 매수함수 buy("b1",AtStop,c+0.3,1); buy("b2",AtStop,c+0.5,1); } if MarketPosition == 1 Then { //ExitLong("bx",atlimit,AvgEntryPrice+1.0); //진입신호 다음다음봉부터 가격조건만족시 신호발생을 위한 매수함수 if highest(H,BarsSinceEntry) < EntryPrice+0.3 Then buy("b1.",AtStop,EntryPrice+0.3,1); if highest(H,BarsSinceEntry) < EntryPrice+0.5 Then buy("b2.",AtStop,EntryPrice+0.5,1); } if count < 1 and stime >= 100000 and stime < 153000 and CrossDown(c,var1) Then { sell(); //진입신호 바로 다음봉에서 가격조건만족시 신호발생을 위한 매도함수 sell("s1",AtStop,c-0.3,1); sell("s2",AtStop,c-0.5,1); } if MarketPosition == -1 Then { //ExitShort("sx",AtLimit,AvgEntryPrice-1.0); //진입신호 다음다음봉부터 가격조건만족시 신호발생을 위한 매도함수 if Lowest(L,BarsSinceEntry) > EntryPrice-0.3 then sell("s1.",AtStop,EntryPrice-0.3,1); if Lowest(L,BarsSinceEntry) > EntryPrice-0.5 then sell("s2.",AtStop,EntryPrice-0.5,1); } SetStopProfittarget(1,PointStop); > 호시우보 님이 쓴 글입니다. > 제목 : 문의 드립니다. > 아래식 수정 부탁합니다. 정확하게 매도쪽에 피라미딩 신호가 적용되지가 않습니다, 또한, 매 진입단가별로 +1.0 수익에서 익절하는 식은 어떻게 하는지요..? 감사합니다. var1 = ma(C,20); # 매도/매수 1회로 제한 var : count(0),cnt(0); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } if count < 1 and stime >= 100000 and stime < 153000 and crossup(c,var1) Then buy(); //진입신호 바로 다음봉에서 가격조건만족시 신호발생을 위한 매수함수 buy("b1",AtStop,c+0.3,1); buy("b2",AtStop,c+0.5,1); if MarketPosition == 1 Then{ ExitLong("bx",atlimit,AvgEntryPrice+1.0); //진입신호 다음다음봉부터 가격조건만족시 신호발생을 위한 매수함수 if highest(H,BarsSinceEntry) < EntryPrice+0.3 Then buy("b1.",AtStop,EntryPrice+0.3,1); if highest(H,BarsSinceEntry) < EntryPrice+0.5 Then buy("b2.",AtStop,EntryPrice+0.5,1); if count < 1 and stime >= 100000 and stime < 153000 and CrossDown(c,var1) Then sell(); //진입신호 바로 다음봉에서 가격조건만족시 신호발생을 위한 매도함수 sell("s1",AtStop,c-0.3,1); sell("s2",AtStop,c-0.5,1); if MarketPosition == -1 Then{ ExitShort("sx",AtLimit,AvgEntryPrice-1.0); //진입신호 다음다음봉부터 가격조건만족시 신호발생을 위한 매도함수 if Lowest(L,BarsSinceEntry) > EntryPrice-0.3 then sell("s1.",AtStop,EntryPrice-0.3,1); if Lowest(L,BarsSinceEntry) > EntryPrice-0.5 then sell("s2.",AtStop,EntryPrice-0.5,1); }} //0.3 0.5에 한개씩 파라미딩...평균진입가 +1.0에서 청산