커뮤니티

수식 정정 부탁합니다.

프로필 이미지
재정적자유
2015-04-19 00:34:13
113
글번호 85158
답변완료
아랫 부분은 저번에 받은 답변입니다. 아래 두 식에서 진입 조건은 그대로 두고 청산 조건을 "진입 봉 종가 청산" 과 "익절","손절"만 두고 나머지는 지워 주십시요. 질문 하나 전략 실행 차트에서 캔들에 옆으로 누운 삼각형 두개는 신호가와 체결가를 나타내는 겁니까? 질문 둘 캔들에 "s""b 0" "빨간 화살표와 파란 화살표"등의 뜻은 무엇인지요? 질문 셋 10분 봉을 사용하여 "봉시가 대비 10틱 상승시 진입" 전략에서 청산을 "5틱 손실시 청산" 으로했을때 만약 손실청산 되었다면 아직 봉이 바뀌지 않는한 같은봉에서 진입과 청산이 10분봉이 바뀔때까지 계속 발생 되나요? 질문 넷 아래 함수에서 손절틱수와 익절틱수의 위치가 서로 바뀌지 않았는지요? SetStopProfittarget(PriceScale*손절틱수,PointStop); SetStopLoss(PriceScale*익절틱수,PointStop); 부탁 드립니다. 안녕하세요 예스스탁입니다. 1번식은 한봉에 매수와 매도 한번씩 진입합니다. 매수나 매도중 하나만 진입하기 위해서는 수식에서 지정한 가격 터치시 진입은 atstop이나 atlimit타입을 사용하는데 모두 전봉에서 가격을 셋팅해 현재봉시세 조건만족시에 신호가 발생합니다. 그러므로 매수나 매도중 하나만 진입하기 위해서는 2개가 동시에 충족되지 않는 조건을 넣어야 합니다. 2번식은 시가가 직전봉 종가대비 같거나 높으면 매수쪽으로만 시가가 지전봉 종가대비 아래면 매도쪽으로만 진입이 발생하게 작성한 식입니다. 이용에 참고하시기 바랍니다. 1. input : 시가대비틱수(5),손절틱수(10),익절틱수(20),최고수익대비하락틱수(10); input : X(5),Y(10),A(5),B(5); if MarketPosition <= 0 Then buy("b",AtStop,NextBarOpen+PriceScale*시가대비틱수); if MarketPosition >= 0 then sell("s",AtStop,NextBarOpen-PriceScale*시가대비틱수); if MarketPosition == 1 Then{ exitlong("btr1",AtStop,Highest(H,BarsSinceEntry)-PriceScale*최고수익대비하락틱수); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*x and highest(H,BarsSinceEntry) < EntryPrice+PriceScale*y Then exitlong("btr2",AtStop,highest(H,BarsSinceEntry)-PriceScale*a); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*y Then exitlong("btr3",AtStop,highest(H,BarsSinceEntry)-PriceScale*b); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*최고수익대비하락틱수); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*x and Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*y Then ExitShort("str2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*a); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*y Then ExitShort("str3",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*b); } ExitLong("매수진입봉종가청산"); ExitShort("매도진입봉종가청산"); SetStopProfittarget(PriceScale*손절틱수,PointStop); SetStopLoss(PriceScale*익절틱수,PointStop); 2. input : 시가대비틱수(5),손절틱수(10),익절틱수(20),최고수익대비하락틱수(10); input : X(5),Y(10),A(5),B(5); if MarketPosition <= 0 and NextBarOpen >= C Then buy("b",AtStop,NextBarOpen+PriceScale*시가대비틱수); if MarketPosition >= 0 and NextBarOpen < C then sell("s",AtStop,NextBarOpen-PriceScale*시가대비틱수); if MarketPosition == 1 Then{ exitlong("btr1",AtStop,Highest(H,BarsSinceEntry)-PriceScale*최고수익대비하락틱수); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*x and highest(H,BarsSinceEntry) < EntryPrice+PriceScale*y Then exitlong("btr2",AtStop,highest(H,BarsSinceEntry)-PriceScale*a); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*y Then exitlong("btr3",AtStop,highest(H,BarsSinceEntry)-PriceScale*b); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*최고수익대비하락틱수); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*x and Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*y Then ExitShort("str2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*a); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*y Then ExitShort("str3",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*b); } ExitLong("매수진입봉종가청산"); ExitShort("매도진입봉종가청산"); SetStopProfittarget(PriceScale*손절틱수,PointStop); SetStopLoss(PriceScale*익절틱수,PointStop); 즐거운 하루되세요 > 재정적자유 님이 쓴 글입니다. > 제목 : 진입 봉 종가 청산 부탁합니다. > 1. input : 시가대비틱수(5),손절틱수(10),익절틱수(20),최고수익대비하락틱수(10); input : X(5),Y(10),A(5),B(5); if MarketPosition <= 0 Then buy("b",AtStop,NextBarOpen+PriceScale*시가대비틱수); if MarketPosition >= 0 then sell("s",AtStop,NextBarOpen-PriceScale*시가대비틱수); if MarketPosition == 1 Then{ exitlong("btr1",AtStop,Highest(H,BarsSinceEntry)-PriceScale*최고수익대비하락틱수); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*x and highest(H,BarsSinceEntry) < EntryPrice+PriceScale*y Then exitlong("btr2",AtStop,highest(H,BarsSinceEntry)-PriceScale*a); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*y Then exitlong("btr3",AtStop,highest(H,BarsSinceEntry)-PriceScale*b); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*최고수익대비하락틱수); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*x and Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*y Then ExitShort("str2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*a); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*y Then ExitShort("str3",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*b); } SetStopProfittarget(PriceScale*손절틱수,PointStop); SetStopLoss(PriceScale*익절틱수,PointStop); 2번 input : 시가대비틱수(5),손절틱수(10),익절틱수(20),최고수익대비하락틱수(10); input : X(5),Y(10),A(5),B(5); if MarketPosition <= 0 and NextBarOpen >= C Then buy("b",AtStop,NextBarOpen+PriceScale*시가대비틱수); if MarketPosition >= 0 and NextBarOpen < C then sell("s",AtStop,NextBarOpen-PriceScale*시가대비틱수); if MarketPosition == 1 Then{ exitlong("btr1",AtStop,Highest(H,BarsSinceEntry)-PriceScale*최고수익대비하락틱수); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*x and highest(H,BarsSinceEntry) < EntryPrice+PriceScale*y Then exitlong("btr2",AtStop,highest(H,BarsSinceEntry)-PriceScale*a); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*y Then exitlong("btr3",AtStop,highest(H,BarsSinceEntry)-PriceScale*b); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*최고수익대비하락틱수); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*x and Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*y Then ExitShort("str2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*a); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*y Then ExitShort("str3",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*b); } SetStopProfittarget(PriceScale*손절틱수,PointStop); SetStopLoss(PriceScale*익절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-04-20 13:34:29

안녕하세요 예스스탁입니다. 1-1 input : 시가대비틱수(5),손절틱수(10),익절틱수(20),최고수익대비하락틱수(10); input : X(5),Y(10),A(5),B(5); if MarketPosition <= 0 Then buy("b",AtStop,NextBarOpen+PriceScale*시가대비틱수); if MarketPosition >= 0 then sell("s",AtStop,NextBarOpen-PriceScale*시가대비틱수); ExitLong("매수진입봉종가청산"); ExitShort("매도진입봉종가청산"); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 1-2 input : 시가대비틱수(5),손절틱수(10),익절틱수(20),최고수익대비하락틱수(10); input : X(5),Y(10),A(5),B(5); if MarketPosition <= 0 and NextBarOpen >= C Then buy("b",AtStop,NextBarOpen+PriceScale*시가대비틱수); if MarketPosition >= 0 and NextBarOpen < C then sell("s",AtStop,NextBarOpen-PriceScale*시가대비틱수); ExitLong("매수진입봉종가청산"); ExitShort("매도진입봉종가청산"); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. 신호가입니다. 수식에서 체결가는 알수없습니다. 3. 영문은 수식에서 지정한 신호의 이름입니다. 수식 내용에 보시면 신호함수에 "b","s"등 지정한 이름을 보실수 있습니다. 신호위에 숫자는 현재남은 수량입니다. 4. 예 바꿔서 지정이 되어 있었습니다. 위에 변경했습니다. 즐거운 하루되세요 > 재정적자유 님이 쓴 글입니다. > 제목 : 수식 정정 부탁합니다. > 아랫 부분은 저번에 받은 답변입니다. 아래 두 식에서 진입 조건은 그대로 두고 청산 조건을 "진입 봉 종가 청산" 과 "익절","손절"만 두고 나머지는 지워 주십시요. 질문 하나 전략 실행 차트에서 캔들에 옆으로 누운 삼각형 두개는 신호가와 체결가를 나타내는 겁니까? 질문 둘 캔들에 "s""b 0" "빨간 화살표와 파란 화살표"등의 뜻은 무엇인지요? 질문 셋 10분 봉을 사용하여 "봉시가 대비 10틱 상승시 진입" 전략에서 청산을 "5틱 손실시 청산" 으로했을때 만약 손실청산 되었다면 아직 봉이 바뀌지 않는한 같은봉에서 진입과 청산이 10분봉이 바뀔때까지 계속 발생 되나요? 질문 넷 아래 함수에서 손절틱수와 익절틱수의 위치가 서로 바뀌지 않았는지요? SetStopProfittarget(PriceScale*손절틱수,PointStop); SetStopLoss(PriceScale*익절틱수,PointStop); 부탁 드립니다. 안녕하세요 예스스탁입니다. 1번식은 한봉에 매수와 매도 한번씩 진입합니다. 매수나 매도중 하나만 진입하기 위해서는 수식에서 지정한 가격 터치시 진입은 atstop이나 atlimit타입을 사용하는데 모두 전봉에서 가격을 셋팅해 현재봉시세 조건만족시에 신호가 발생합니다. 그러므로 매수나 매도중 하나만 진입하기 위해서는 2개가 동시에 충족되지 않는 조건을 넣어야 합니다. 2번식은 시가가 직전봉 종가대비 같거나 높으면 매수쪽으로만 시가가 지전봉 종가대비 아래면 매도쪽으로만 진입이 발생하게 작성한 식입니다. 이용에 참고하시기 바랍니다. 1. input : 시가대비틱수(5),손절틱수(10),익절틱수(20),최고수익대비하락틱수(10); input : X(5),Y(10),A(5),B(5); if MarketPosition <= 0 Then buy("b",AtStop,NextBarOpen+PriceScale*시가대비틱수); if MarketPosition >= 0 then sell("s",AtStop,NextBarOpen-PriceScale*시가대비틱수); if MarketPosition == 1 Then{ exitlong("btr1",AtStop,Highest(H,BarsSinceEntry)-PriceScale*최고수익대비하락틱수); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*x and highest(H,BarsSinceEntry) < EntryPrice+PriceScale*y Then exitlong("btr2",AtStop,highest(H,BarsSinceEntry)-PriceScale*a); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*y Then exitlong("btr3",AtStop,highest(H,BarsSinceEntry)-PriceScale*b); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*최고수익대비하락틱수); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*x and Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*y Then ExitShort("str2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*a); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*y Then ExitShort("str3",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*b); } ExitLong("매수진입봉종가청산"); ExitShort("매도진입봉종가청산"); SetStopProfittarget(PriceScale*손절틱수,PointStop); SetStopLoss(PriceScale*익절틱수,PointStop); 2. input : 시가대비틱수(5),손절틱수(10),익절틱수(20),최고수익대비하락틱수(10); input : X(5),Y(10),A(5),B(5); if MarketPosition <= 0 and NextBarOpen >= C Then buy("b",AtStop,NextBarOpen+PriceScale*시가대비틱수); if MarketPosition >= 0 and NextBarOpen < C then sell("s",AtStop,NextBarOpen-PriceScale*시가대비틱수); if MarketPosition == 1 Then{ exitlong("btr1",AtStop,Highest(H,BarsSinceEntry)-PriceScale*최고수익대비하락틱수); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*x and highest(H,BarsSinceEntry) < EntryPrice+PriceScale*y Then exitlong("btr2",AtStop,highest(H,BarsSinceEntry)-PriceScale*a); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*y Then exitlong("btr3",AtStop,highest(H,BarsSinceEntry)-PriceScale*b); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*최고수익대비하락틱수); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*x and Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*y Then ExitShort("str2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*a); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*y Then ExitShort("str3",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*b); } ExitLong("매수진입봉종가청산"); ExitShort("매도진입봉종가청산"); SetStopProfittarget(PriceScale*손절틱수,PointStop); SetStopLoss(PriceScale*익절틱수,PointStop); 즐거운 하루되세요 > 재정적자유 님이 쓴 글입니다. > 제목 : 진입 봉 종가 청산 부탁합니다. > 1. input : 시가대비틱수(5),손절틱수(10),익절틱수(20),최고수익대비하락틱수(10); input : X(5),Y(10),A(5),B(5); if MarketPosition <= 0 Then buy("b",AtStop,NextBarOpen+PriceScale*시가대비틱수); if MarketPosition >= 0 then sell("s",AtStop,NextBarOpen-PriceScale*시가대비틱수); if MarketPosition == 1 Then{ exitlong("btr1",AtStop,Highest(H,BarsSinceEntry)-PriceScale*최고수익대비하락틱수); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*x and highest(H,BarsSinceEntry) < EntryPrice+PriceScale*y Then exitlong("btr2",AtStop,highest(H,BarsSinceEntry)-PriceScale*a); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*y Then exitlong("btr3",AtStop,highest(H,BarsSinceEntry)-PriceScale*b); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*최고수익대비하락틱수); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*x and Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*y Then ExitShort("str2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*a); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*y Then ExitShort("str3",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*b); } SetStopProfittarget(PriceScale*손절틱수,PointStop); SetStopLoss(PriceScale*익절틱수,PointStop); 2번 input : 시가대비틱수(5),손절틱수(10),익절틱수(20),최고수익대비하락틱수(10); input : X(5),Y(10),A(5),B(5); if MarketPosition <= 0 and NextBarOpen >= C Then buy("b",AtStop,NextBarOpen+PriceScale*시가대비틱수); if MarketPosition >= 0 and NextBarOpen < C then sell("s",AtStop,NextBarOpen-PriceScale*시가대비틱수); if MarketPosition == 1 Then{ exitlong("btr1",AtStop,Highest(H,BarsSinceEntry)-PriceScale*최고수익대비하락틱수); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*x and highest(H,BarsSinceEntry) < EntryPrice+PriceScale*y Then exitlong("btr2",AtStop,highest(H,BarsSinceEntry)-PriceScale*a); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*y Then exitlong("btr3",AtStop,highest(H,BarsSinceEntry)-PriceScale*b); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*최고수익대비하락틱수); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*x and Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*y Then ExitShort("str2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*a); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*y Then ExitShort("str3",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*b); } SetStopProfittarget(PriceScale*손절틱수,PointStop); SetStopLoss(PriceScale*익절틱수,PointStop);