커뮤니티

수식 검토 바랍니다.

프로필 이미지
재정적자유
2015-04-16 20:48:34
167
글번호 85120
답변완료
저번 질문 과 답변에서 부족한점이 있어 다시 질문 드립니다. 아래 두 가지 수식모두 청산 방법이 다섯 가지 입니다. 저번 질문에서 답해주신 "진입봉 종가 청산"함수도 다른 네가지 청산과 마찬가지로 "또는"으로 작성 되어있는지요? 그러니까 다섯가지 청산함수 중에 아무거나 한가지 함수만 만족해도 청산 되도록 짜여져있는지 궁금합니다. 만약 그렇지 않다면 "또는"으로 해서 두 수식을 작성해 주신면 감사 하겠습니다. 부탁 드립니다. 안녕하세요 예스스탁입니다. 진입 봉 종가 청산이 어떤 의미이신지 모르겠습니다. 진입후 해당봉의 종가에 무조건 청산하시는 내용이면 아래와 같습니다. 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-17 11:06:57

안녕하세요 예스스탁입니다. 예 모두 따로 동작(또는)하게 작성되어 있습니다. 즐거운 하루되세요 > 재정적자유 님이 쓴 글입니다. > 제목 : 수식 검토 바랍니다. > 저번 질문 과 답변에서 부족한점이 있어 다시 질문 드립니다. 아래 두 가지 수식모두 청산 방법이 다섯 가지 입니다. 저번 질문에서 답해주신 "진입봉 종가 청산"함수도 다른 네가지 청산과 마찬가지로 "또는"으로 작성 되어있는지요? 그러니까 다섯가지 청산함수 중에 아무거나 한가지 함수만 만족해도 청산 되도록 짜여져있는지 궁금합니다. 만약 그렇지 않다면 "또는"으로 해서 두 수식을 작성해 주신면 감사 하겠습니다. 부탁 드립니다. 안녕하세요 예스스탁입니다. 진입 봉 종가 청산이 어떤 의미이신지 모르겠습니다. 진입후 해당봉의 종가에 무조건 청산하시는 내용이면 아래와 같습니다. 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); 위 두 로직에 진입 봉 종가 청산 함수가 없는것 같습니다. " 진입 봉 종가 청산 " 함수를 두 로직에 넣어 주십시요. 감사 합니다.