커뮤니티

문의 드립니다.

프로필 이미지
푸른
2022-10-04 16:54:22
915
글번호 162718
답변완료

첨부 이미지

input : 익절틱수(160),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("ss",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("ss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); Sell("s2",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10); ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("sss",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("sss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*10); Sell("s8",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("bb",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("bb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*10); Sell("s9",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("bbb",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("bbb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ------------- 늘 감사합니다. 체결내역을 보시면 1번 매수 2번 매수청산 3번 스위칭으로 매도 4번 매도청산 이렇게 이해하고있습니다. 5번 스위칭으로 매수 신호가 없는데 위 수식어에서 가능 유무를 문의 드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-10-05 16:08:21

안녕하세요 예스스탁입니다. 1 예 맞습니다. 매수진입 -> 매도스위칭(매수청산, 매도진입) --> 매도청산 2 다시 스위칭 가능하지 않습니다. if문은 봉완성이 기준입니다. 봉 중간에 포지션 변경되는 것을 인지 하지 못합니다. 3 수식에 손절이나 익절이 여러개 설정하는 것은 의미가 없습니다. 제일 하단의 하나만 설정됩니다. 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다. > input : 익절틱수(160),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("ss",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("ss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); Sell("s2",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10); ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("sss",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("sss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*10); Sell("s8",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("bb",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("bb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*10); Sell("s9",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("bbb",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("bbb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ------------- 늘 감사합니다. 체결내역을 보시면 1번 매수 2번 매수청산 3번 스위칭으로 매도 4번 매도청산 이렇게 이해하고있습니다. 5번 스위칭으로 매수 신호가 없는데 위 수식어에서 가능 유무를 문의 드립니다.