커뮤니티

수식부탁 드립니다

프로필 이미지
기관장
2020-02-10 00:55:11
277
글번호 135765
답변완료
예스스탁님 하기식 수정 부탁 드립니다 ================================= . input : P1(5),P2(3),P3(3); var : stok1(0),stod1(0); stok1 = StochasticsK(P1,P2); stod1 = StochasticsD(P1,P2,P3); if MarketPosition == 0 and c>ma(c,5) then buy(); if MarketPosition == 1 then { if stok1 >= 50 Then ExitLong("bx1",AtStop,highest(H,5)*0.95); if highest(H,BarsSinceEntry) >= EntryPrice*1.05 and stok1 >= 50 Then ExitLong("bx2",AtStop,highest(H,BarsSinceEntry)*0.95); } SetStopLoss(5,PercentStop); ================================================== 상기 식에서 bx1, bx2가 봉 끝나고가 아닌 조건 만족시 즉시 매도 될수 맀도록 바꿔어서 식을 주시면 감사 하겠습니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-02-10 16:14:08

안녕하세요 예스스탁입니다. bx1,bx2가 atstop타입으로 봉미완성시로 처리가 되어 있습니다. 다만 랭귀지에서는 완성봉에서 지정한 값과 현재가와 비교만 되어 미완성봉에서 포함해서 if조건이 만족하는 것을 체크하고 지정한 가격을 셋팅해 신호발생은 불가능합니다. bx1는 봉완성시 stok1이 50이상이면 5개봉최고가-5%를 셋팅하고 다음봉의 현재가가 해당 가격이하이면 즉시 청산 bx2는 봉완성시 stok1이 50이상이고 최고수익이 진입가대비 5% 이상이면 진입이후 최고가-5%를 세팅하고 음봉의 현재가가 해당 가격이하이면 즉시 청산하게 됩니다. 해당식 이상으로 처리가 될수 없습니다. input : P1(5),P2(3),P3(3); var : stok1(0),stod1(0); stok1 = StochasticsK(P1,P2); stod1 = StochasticsD(P1,P2,P3); if MarketPosition == 0 and c>ma(c,5) then buy(); if MarketPosition == 1 then { if stok1 >= 50 Then ExitLong("bx1",AtStop,highest(H,5)*0.95); if highest(H,BarsSinceEntry) >= EntryPrice*1.05 and stok1 >= 50 Then ExitLong("bx2",AtStop,highest(H,BarsSinceEntry)*0.95); } SetStopLoss(5,PercentStop); 즐거운 하루되세요 > 기관장 님이 쓴 글입니다. > 제목 : 수식부탁 드립니다 > 예스스탁님 하기식 수정 부탁 드립니다 ================================= . input : P1(5),P2(3),P3(3); var : stok1(0),stod1(0); stok1 = StochasticsK(P1,P2); stod1 = StochasticsD(P1,P2,P3); if MarketPosition == 0 and c>ma(c,5) then buy(); if MarketPosition == 1 then { if stok1 >= 50 Then ExitLong("bx1",AtStop,highest(H,5)*0.95); if highest(H,BarsSinceEntry) >= EntryPrice*1.05 and stok1 >= 50 Then ExitLong("bx2",AtStop,highest(H,BarsSinceEntry)*0.95); } SetStopLoss(5,PercentStop); ================================================== 상기 식에서 bx1, bx2가 봉 끝나고가 아닌 조건 만족시 즉시 매도 될수 맀도록 바꿔어서 식을 주시면 감사 하겠습니다.