커뮤니티

수식부탁드립니다.

프로필 이미지
디얼디어
2020-04-07 23:55:23
864
글번호 137676
답변완료
차트 2개 연동 1번차트 5분봉 2번차트 30분봉 매매시간은 10시부터 12시까지 하루진입1번만 수익30틱 손절 15틱 수익이나 손절시 매매종료 30분봉 차트에서 macd데드크로스일때(3개봉이내발생 기준선50위일때) 5분봉에서도 macd 데드크로스 되면 매도 진입 30분봉 차트에서 macd골든크로스일때(3개봉이내발생 기준선50아래일때) 5분봉에서도 macd 골든코르소 되면 매수 진입 진입후 15틱이상 갔다가 30틱 못가고 0틱되면 본절 청산 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-04-08 11:22:26

안녕하세요 예스스탁입니다. 기본차트는 5분, 참조데이타로 30분 추가하고 아래식 적용하시면 됩니다. Input : short(12), long(26), signal(9); input : 익절틱수(30),손절틱수(15); var : entry(0,data1); Var : MACDV1(0,data1) , MACDS1(0,data1) ; Var : MACDV2(0,data2) , MACDS2(0,data2) ; MACDV1 = data1(MACD(short, long)); MACDS1 = data1(ema(MACDV1,signal)); MACDV2 = data2(MACD(short, long)); MACDS2 = data2(ema(MACDV2,signal)); if bdate != bdate[1] Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition then entry = entry+1; if stime >= 100000 and stime < 120000 then { if data2(countif(CrossDown(macdv2,macds2) and macdv2 > 0,3) >= 1) and data1(CrossDown(macdv1,macds1)) Then sell(); if data2(countif(Crossup(macdv2,macds2) and macdv2 < 0,3) >= 1) and data1(CrossUp(macdv1,macds1)) Then buy(); } if MarketPosition == 1 then { if data1(highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*15) Then ExitLong("bx",AtStop,EntryPrice); } if MarketPosition == -1 then { if data1(Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*15) Then ExitShort("sx",AtStop,EntryPrice); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 디얼디어 님이 쓴 글입니다. > 제목 : 수식부탁드립니다. > 차트 2개 연동 1번차트 5분봉 2번차트 30분봉 매매시간은 10시부터 12시까지 하루진입1번만 수익30틱 손절 15틱 수익이나 손절시 매매종료 30분봉 차트에서 macd데드크로스일때(3개봉이내발생 기준선50위일때) 5분봉에서도 macd 데드크로스 되면 매도 진입 30분봉 차트에서 macd골든크로스일때(3개봉이내발생 기준선50아래일때) 5분봉에서도 macd 골든코르소 되면 매수 진입 진입후 15틱이상 갔다가 30틱 못가고 0틱되면 본절 청산 부탁드립니다.