커뮤니티

매수진입-매수청산 수식을 매도진입-매도청산수식으로 변환 요청건

프로필 이미지
이형지
2020-06-02 22:24:39
2022
글번호 139502
답변완료
아래식은 매수진입 - 매수청산 수식인데요... 아래식과 같은 컨셉으로 매도진입 --매도 청산 수식 부탁드려요~~ # 오일 10분봉 추세매매 #매수 조건1 input :신고가평균봉수(100); input : 신고가거래제한봉수(50); input : 거래량(2000); #청산 조건 input : 청산이평(30); input : 손절이평(70); input : 익절틱수(80),손절틱수(90); var : hi1(0),hi2(0),mav1(0),mav2(0); mav1 = ma(C,청산이평); mav2 = ma(C,손절이평); Condition1 = H > highest(H,신고가평균봉수)[1]; if Condition1 == true Then { hi1 = index; hi2 = hi1[1]; if (hi2 == 0 or (hi2 > 0 and hi1 > hi2+신고가거래제한봉수)) and V >= 거래량 Then buy("매수진입",AtMarket); } if MarketPosition == 1 then { if c < EntryPrice and CrossDown(c,mav2) Then exitlong("손절"); if c > EntryPrice and CrossDown(c,mav1) Then exitlong("이익실현"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2020-06-03 14:17:35

안녕하세요 예스스탁입니다. input : 신저가평균봉수(100); input : 신저가거래제한봉수(50); input : 거래량(2000); #청산 조건 input : 청산이평(30); input : 손절이평(70); input : 익절틱수(80),손절틱수(90); var : li1(0),li2(0),mav1(0),mav2(0); mav1 = ma(C,청산이평); mav2 = ma(C,손절이평); Condition1 = L < highest(L,신저가평균봉수)[1]; if Condition1 == true Then { li1 = index; li2 = li1[1]; if (li2 == 0 or (li2 > 0 and li1 > li2+신저가거래제한봉수)) and V >= 거래량 Then sell("매도진입",AtMarket); } if MarketPosition == -1 then { if c > EntryPrice and CrossUp(c,mav2) Then ExitShort("손절"); if c < EntryPrice and Crossup(c,mav1) Then ExitShort("이익실현"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 이형지 님이 쓴 글입니다. > 제목 : 매수진입-매수청산 수식을 매도진입-매도청산수식으로 변환 요청건 > 아래식은 매수진입 - 매수청산 수식인데요... 아래식과 같은 컨셉으로 매도진입 --매도 청산 수식 부탁드려요~~ # 오일 10분봉 추세매매 #매수 조건1 input :신고가평균봉수(100); input : 신고가거래제한봉수(50); input : 거래량(2000); #청산 조건 input : 청산이평(30); input : 손절이평(70); input : 익절틱수(80),손절틱수(90); var : hi1(0),hi2(0),mav1(0),mav2(0); mav1 = ma(C,청산이평); mav2 = ma(C,손절이평); Condition1 = H > highest(H,신고가평균봉수)[1]; if Condition1 == true Then { hi1 = index; hi2 = hi1[1]; if (hi2 == 0 or (hi2 > 0 and hi1 > hi2+신고가거래제한봉수)) and V >= 거래량 Then buy("매수진입",AtMarket); } if MarketPosition == 1 then { if c < EntryPrice and CrossDown(c,mav2) Then exitlong("손절"); if c > EntryPrice and CrossDown(c,mav1) Then exitlong("이익실현"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
프로필 이미지

이형지

2020-06-03 15:40:22

이형지 님에 의해 삭제된 답변입니다.
프로필 이미지

예스스탁 예스스탁 답변

2020-06-03 15:51:27

안녕하세요 예스스탁입니다. 1 기존식의 조건을 그대로 하고 진입과 청산신호만 반대로 할경우에는 아래와 같이 변경하시면 됩니다. buy --> sell exitlong --> exitshort MarketPosition == 1 --> MarketPosition == -1 아래식은 조건도 반대로 변경한 식입니다. 2 input : 신저가평균봉수(100); input : 신저가거래제한봉수(50); input : 거래량(2000); #청산 조건 input : 청산이평(30); input : 손절이평(70); input : 익절틱수(80),손절틱수(90); var : li1(0),li2(0),mav1(0),mav2(0); mav1 = ma(C,청산이평); mav2 = ma(C,손절이평); Condition1 = L < lowest(L,신저가평균봉수)[1]; if Condition1 == true Then { li1 = index; li2 = li1[1]; if (li2 == 0 or (li2 > 0 and li1 > li2+신저가거래제한봉수)) and V >= 거래량 Then sell("매도진입",AtMarket); } if MarketPosition == -1 then { if c > EntryPrice and CrossUp(c,mav2) Then ExitShort("손절"); if c < EntryPrice and Crossup(c,mav1) Then ExitShort("이익실현"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 이형지 님이 쓴 글입니다. > 제목 : Re : Re : 매수진입-매수청산 수식을 매도진입-매도청산수식으로 변환 요청건 > 주신 식으로 직접 돌려보니 작동이 안되어 일부 수정하였으나 여전히 진입이 하나도 되지 않네요.. 원인 파악 해주세요..... 바꾼것 : buy --> sell 그리고 exitlong --> exitshort input : 신저가평균봉수(100); input : 신저가거래제한봉수(50); input : 거래량(2000); #청산 조건 input : 청산이평(30); input : 손절이평(70); input : 익절틱수(80),손절틱수(90); var : li1(0),li2(0),mav1(0),mav2(0); mav1 = ma(C,청산이평); mav2 = ma(C,손절이평); Condition1 = L < highest(L,신저가평균봉수)[1]; if Condition1 == true Then { li1 = index; li2 = li1[1]; if (li2 == 0 or (li2 > 0 and li1 > li2+신저가거래제한봉수)) and V >= 거래량 Then Sell("매도진입",AtMarket); } if MarketPosition == -1 then { if c > EntryPrice and CrossUp(c,mav2) Then ExitShort("손절"); if c < EntryPrice and Crossup(c,mav1) Then ExitShort("이익실현"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 매수진입-매수청산 수식을 매도진입-매도청산수식으로 변환 요청건 > 안녕하세요 예스스탁입니다. input : 신저가평균봉수(100); input : 신저가거래제한봉수(50); input : 거래량(2000); #청산 조건 input : 청산이평(30); input : 손절이평(70); input : 익절틱수(80),손절틱수(90); var : li1(0),li2(0),mav1(0),mav2(0); mav1 = ma(C,청산이평); mav2 = ma(C,손절이평); Condition1 = L < highest(L,신저가평균봉수)[1]; if Condition1 == true Then { li1 = index; li2 = li1[1]; if (li2 == 0 or (li2 > 0 and li1 > li2+신저가거래제한봉수)) and V >= 거래량 Then sell("매도진입",AtMarket); } if MarketPosition == -1 then { if c > EntryPrice and CrossUp(c,mav2) Then ExitShort("손절"); if c < EntryPrice and Crossup(c,mav1) Then ExitShort("이익실현"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 이형지 님이 쓴 글입니다. > 제목 : 매수진입-매수청산 수식을 매도진입-매도청산수식으로 변환 요청건 > 아래식은 매수진입 - 매수청산 수식인데요... 아래식과 같은 컨셉으로 매도진입 --매도 청산 수식 부탁드려요~~ # 오일 10분봉 추세매매 #매수 조건1 input :신고가평균봉수(100); input : 신고가거래제한봉수(50); input : 거래량(2000); #청산 조건 input : 청산이평(30); input : 손절이평(70); input : 익절틱수(80),손절틱수(90); var : hi1(0),hi2(0),mav1(0),mav2(0); mav1 = ma(C,청산이평); mav2 = ma(C,손절이평); Condition1 = H > highest(H,신고가평균봉수)[1]; if Condition1 == true Then { hi1 = index; hi2 = hi1[1]; if (hi2 == 0 or (hi2 > 0 and hi1 > hi2+신고가거래제한봉수)) and V >= 거래량 Then buy("매수진입",AtMarket); } if MarketPosition == 1 then { if c < EntryPrice and CrossDown(c,mav2) Then exitlong("손절"); if c > EntryPrice and CrossDown(c,mav1) Then exitlong("이익실현"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);