커뮤니티

손실 청산 발생시 당일 진입 금지 수식 부탁합니다.

프로필 이미지
이형지
2020-01-09 11:43:07
174
글번호 135009
답변완료
즉시손절1값으로 손절된후 N봉 이후에 진입하는 수식인데요... 아예 이익청산시에는 계속 거래 가능하고 즉시 손절시에는 해당 영업일 당일은 아예 거래가 중단되게 하는 수식 부탁드리겠습니다. 참고로 해외선물입니다. 예를 들면 19시 진입 - 수익 청산 24시 진입 새벽 2시 즉시손절1 발생 그후에는 장종료(새벽 6시)까지 진입 금지 다음날 (아침 8시) 부터 신규 진입 가능 if bdate != bdate[1] Then Entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; Condition2 = MarketPosition == 0 and (IsExitName("즉시손절1",1) == false or (IsExitName("즉시손절1",1) == true and BarsSinceExit(1) > N)); Condition1 = RSIv < RSI매수값 and Simri < 심리도값; if bdate != bdate[1] Then { DD = DD+1; if var2 > 0 and DD == var2+초기화 Then BuySetup = false; } if BuySetup == false and Condition1 == true and Condition1[1] == false Then { var1 = C; var2 = DD; BuySetup = true; } /* if BuySetup == true and CrossDown(CCIv,CCI값) Then BuySetup = false;*/ if Condition2 == true and MarketPosition == 0 and BuySetup == true Then buy("매수",AtLimit,var1-PriceScale*하락틱수); #추가진입 if MarketPosition == 1 and MaxEntries < 분할매수횟수 Then buy("추가매수",atlimit,LatestEntryPrice(0)-PriceScale*분할매수틱수,1); if MarketPosition == 1 then { BuySetup = false; if CrossDown(CCIv,CCI값) Then ExitLong("매수cci청산"); ExitLong("즉시익절1",AtLimit,EntryPrice+PriceScale*즉시익절1); ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-01-09 17:29:16

안녕하세요 예스스탁입니다. if bdate != bdate[1] Then { Entry = 0; Condition2 = true; } if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if TotalTrades > TotalTrades[1] and IsExitName("즉시손절1",1) == true then Condition1 = false; Condition1 = RSIv < RSI매수값 and Simri < 심리도값; if bdate != bdate[1] Then { DD = DD+1; if var2 > 0 and DD == var2+초기화 Then BuySetup = false; } if BuySetup == false and Condition1 == true and Condition1[1] == false Then { var1 = C; var2 = DD; BuySetup = true; } /* if BuySetup == true and CrossDown(CCIv,CCI값) Then BuySetup = false;*/ if Condition2 == true and MarketPosition == 0 and BuySetup == true Then buy("매수",AtLimit,var1-PriceScale*하락틱수); #추가진입 if MarketPosition == 1 and MaxEntries < 분할매수횟수 Then buy("추가매수",atlimit,LatestEntryPrice(0)-PriceScale*분할매수틱수,1); if MarketPosition == 1 then { BuySetup = false; if CrossDown(CCIv,CCI값) Then ExitLong("매수cci청산"); ExitLong("즉시익절1",AtLimit,EntryPrice+PriceScale*즉시익절1); ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1); } 즐거운 하루되세요 > 이형지 님이 쓴 글입니다. > 제목 : 손실 청산 발생시 당일 진입 금지 수식 부탁합니다. > 즉시손절1값으로 손절된후 N봉 이후에 진입하는 수식인데요... 아예 이익청산시에는 계속 거래 가능하고 즉시 손절시에는 해당 영업일 당일은 아예 거래가 중단되게 하는 수식 부탁드리겠습니다. 참고로 해외선물입니다. 예를 들면 19시 진입 - 수익 청산 24시 진입 새벽 2시 즉시손절1 발생 그후에는 장종료(새벽 6시)까지 진입 금지 다음날 (아침 8시) 부터 신규 진입 가능 if bdate != bdate[1] Then Entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; Condition2 = MarketPosition == 0 and (IsExitName("즉시손절1",1) == false or (IsExitName("즉시손절1",1) == true and BarsSinceExit(1) > N)); Condition1 = RSIv < RSI매수값 and Simri < 심리도값; if bdate != bdate[1] Then { DD = DD+1; if var2 > 0 and DD == var2+초기화 Then BuySetup = false; } if BuySetup == false and Condition1 == true and Condition1[1] == false Then { var1 = C; var2 = DD; BuySetup = true; } /* if BuySetup == true and CrossDown(CCIv,CCI값) Then BuySetup = false;*/ if Condition2 == true and MarketPosition == 0 and BuySetup == true Then buy("매수",AtLimit,var1-PriceScale*하락틱수); #추가진입 if MarketPosition == 1 and MaxEntries < 분할매수횟수 Then buy("추가매수",atlimit,LatestEntryPrice(0)-PriceScale*분할매수틱수,1); if MarketPosition == 1 then { BuySetup = false; if CrossDown(CCIv,CCI값) Then ExitLong("매수cci청산"); ExitLong("즉시익절1",AtLimit,EntryPrice+PriceScale*즉시익절1); ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1); }