커뮤니티

같은 질문을 여러번 드려서 죄송합니다

프로필 이미지
kjdkdh
2021-03-11 22:17:09
850
글번호 147012
답변완료

첨부 이미지

if MarketPosition == 1 Then { if C < lowest(L,15)[BarsSinceEntry] Then ExitLong("bx1"); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*틱1 Then ExitLong("bx2",AtStop,EntryPrice+수익틱1*PriceScale); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*틱2 Then ExitLong("bx3",AtStop,EntryPrice+수익틱2*PriceScale); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*틱3 Then ExitLong("bx4",AtStop,EntryPrice+수익틱3*PriceScale); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*틱4 Then ExitLong("bx5",AtStop,EntryPrice+수익틱4*PriceScale); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*틱5 Then ExitLong("bx6",AtStop,EntryPrice+수익틱5*PriceScale); ExitLong("bx7",AtLimit,EntryPrice+최종완청틱 *PriceScale); } if MarketPosition == -1 Then { if C > Highest(H,15)[BarsSinceEntry] Then ExitShort("sx1"); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*틱1 Then ExitShort("sx2",AtStop,EntryPrice+수익틱1*PriceScale); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*틱2 Then ExitShort("sx3",AtStop,EntryPrice+수익틱2*PriceScale); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*틱3 Then ExitShort("sx4",AtStop,EntryPrice+수익틱3*PriceScale); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*틱4 Then ExitShort("sx5",AtStop,EntryPrice+수익틱4*PriceScale); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*틱5 Then ExitShort("sx6",AtStop,EntryPrice+수익틱5*PriceScale); ExitShort("sx7",AtLimit,EntryPrice+최종완청틱 *PriceScale); } 매수 매도 손절 문제 매도 수익문제 매수는 정상 최송완정문제 이렇게 확인좀 부탁합니다 중간 중간에 기호로 변경해도 정답이 없네요 손절 --- 진입봉 기준 이전 15봉중에서 매도는 최고가 매수는 최저가 이탈시 손절입니다 청산 --- 50틱 수익나고 내려오면 10틱 챙기자 이런 식입니다 꼼꼼이좀 봐주세요 참 손절보다 다음 신호가 나오면 신호가 우선입니다 손절도 외부 변수로 가능하면 부탁합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-03-12 14:41:41

안녕하세요 예스스탁입니다. 1 수익구간별로 구별하실 경우 수익이 A이상~B미만, B이상~C미만등으로 구간으로 지정해 주셔야 합니다. 2 매도포지션 청산에서 일정수익이 발생하고 수익감소시 수익틱이상 보전하는 내용이므로 EntryPrice-수익틱1*PriceScale로 값이 지정되어야 합니다 ExitShort("sx2",AtStop,EntryPrice-수익틱1*PriceScale); 3 var : BH(0),SL(0); if MarketPosition == 1 Then { if C < lowest(L,15)[BarsSinceEntry] Then ExitLong("bx1"); BH = Highest(H,BarsSinceEntry); if BH >= EntryPrice+PriceScale*틱1 and BH < EntryPrice+PriceScale*틱2 Then ExitLong("bx2",AtStop,EntryPrice+수익틱1*PriceScale); if BH >= EntryPrice+PriceScale*틱2 and BH < EntryPrice+PriceScale*틱3 Then ExitLong("bx3",AtStop,EntryPrice+수익틱2*PriceScale); if BH >= EntryPrice+PriceScale*틱3 and BH < EntryPrice+PriceScale*틱4 Then ExitLong("bx4",AtStop,EntryPrice+수익틱3*PriceScale); if BH >= EntryPrice+PriceScale*틱4 and BH < EntryPrice+PriceScale*틱5 Then ExitLong("bx5",AtStop,EntryPrice+수익틱4*PriceScale); if BH >= EntryPrice+PriceScale*틱5 Then ExitLong("bx6",AtStop,EntryPrice+수익틱5*PriceScale); ExitLong("bx7",AtLimit,EntryPrice+최종완청틱 *PriceScale); } if MarketPosition == -1 Then { if C > Highest(H,15)[BarsSinceEntry] Then ExitShort("sx1"); SL = Lowest(L,BarsSinceEntry); if SL <= EntryPrice-PriceScale*틱1 and SL > EntryPrice-PriceScale*틱2 Then ExitShort("sx2",AtStop,EntryPrice-수익틱1*PriceScale); if SL <= EntryPrice-PriceScale*틱2 and SL > EntryPrice-PriceScale*틱3 Then ExitShort("sx3",AtStop,EntryPrice-수익틱2*PriceScale); if SL <= EntryPrice-PriceScale*틱3 and SL > EntryPrice-PriceScale*틱4 Then ExitShort("sx4",AtStop,EntryPrice-수익틱3*PriceScale); if SL <= EntryPrice-PriceScale*틱4 and SL > EntryPrice-PriceScale*틱5 Then ExitShort("sx5",AtStop,EntryPrice-수익틱4*PriceScale); if SL <= EntryPrice-PriceScale*틱5 Then ExitShort("sx6",AtStop,EntryPrice-수익틱5*PriceScale); ExitShort("sx7",AtLimit,EntryPrice-최종완청틱 *PriceScale); } 즐거운 하루되세요 > kjdkdh 님이 쓴 글입니다. > 제목 : 같은 질문을 여러번 드려서 죄송합니다 > if MarketPosition == 1 Then { if C < lowest(L,15)[BarsSinceEntry] Then ExitLong("bx1"); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*틱1 Then ExitLong("bx2",AtStop,EntryPrice+수익틱1*PriceScale); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*틱2 Then ExitLong("bx3",AtStop,EntryPrice+수익틱2*PriceScale); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*틱3 Then ExitLong("bx4",AtStop,EntryPrice+수익틱3*PriceScale); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*틱4 Then ExitLong("bx5",AtStop,EntryPrice+수익틱4*PriceScale); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*틱5 Then ExitLong("bx6",AtStop,EntryPrice+수익틱5*PriceScale); ExitLong("bx7",AtLimit,EntryPrice+최종완청틱 *PriceScale); } if MarketPosition == -1 Then { if C > Highest(H,15)[BarsSinceEntry] Then ExitShort("sx1"); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*틱1 Then ExitShort("sx2",AtStop,EntryPrice+수익틱1*PriceScale); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*틱2 Then ExitShort("sx3",AtStop,EntryPrice+수익틱2*PriceScale); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*틱3 Then ExitShort("sx4",AtStop,EntryPrice+수익틱3*PriceScale); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*틱4 Then ExitShort("sx5",AtStop,EntryPrice+수익틱4*PriceScale); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*틱5 Then ExitShort("sx6",AtStop,EntryPrice+수익틱5*PriceScale); ExitShort("sx7",AtLimit,EntryPrice+최종완청틱 *PriceScale); } 매수 매도 손절 문제 매도 수익문제 매수는 정상 최송완정문제 이렇게 확인좀 부탁합니다 중간 중간에 기호로 변경해도 정답이 없네요 손절 --- 진입봉 기준 이전 15봉중에서 매도는 최고가 매수는 최저가 이탈시 손절입니다 청산 --- 50틱 수익나고 내려오면 10틱 챙기자 이런 식입니다 꼼꼼이좀 봐주세요 참 손절보다 다음 신호가 나오면 신호가 우선입니다 손절도 외부 변수로 가능하면 부탁합니다