커뮤니티

진입 봉 종가 청산 부탁합니다.

프로필 이미지
재정적자유
2015-04-15 22:48:22
140
글번호 85083
답변완료
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-16 10:20:23

안녕하세요 예스스탁입니다. 진입 봉 종가 청산이 어떤 의미이신지 모르겠습니다. 진입후 해당봉의 종가에 무조건 청산하시는 내용이면 아래와 같습니다. 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); 위 두 로직에 진입 봉 종가 청산 함수가 없는것 같습니다. " 진입 봉 종가 청산 " 함수를 두 로직에 넣어 주십시요. 감사 합니다.