커뮤니티

문의드립니다.

프로필 이미지
하늘북
2019-11-20 07:11:57
138
글번호 133761
답변완료
안녕하세요? 아래 수식이 매수 매도 한번씩만 거래되어야 하는데 청산후 지속적으로 진입하는 현상이 발생합니다. 청산 :30틱 수익시 손절: 30틱 손실시 var : bentry(0,data1),sentry(0,data1); var : H3(0,data3),H5(0,data5); if data1(bdate != bdate[1]) Then { bentry = 0; sentry = 0; } if MarketPosition(0) == 1 and MarketPosition(0) != MarketPosition(0)[1] Then bentry = bentry+1; if MarketPosition(0) == -1 and MarketPosition(0) != MarketPosition(0)[1] Then sentry = sentry+1; if data3(bdate != bdate[1]) Then H3 = data3(H); if data3(H) > H3 Then H3 = data3(H); if data5(bdate != bdate[1]) Then H5 = Data5(H); if data5(H) > H5 Then H5 = data5(H); if bentry < 1 and data2(C) <= H3 and DayHigh-PriceScale*55 Then Sell("s"); if bentry < 1 and data2(C) <= H3 and DayOpen-PriceScale*55 Then Sell("ss"); if sentry < 1 and data4(C) <= H5 and DayOpen+PriceScale*55 Then Buy("b"); if sentry < 1 and data4(C) <= H5 and DayLow+PriceScale*55 Then Buy("bb");
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-11-20 16:56:20

안녕하세요 예스스탁입니다. 1 수식에서 sentry가 매도진입횟수, bentry가 매수진입횟수인데 매수조건과 매도조건에 반대로 적혀있었습니다. var : bentry(0,data1),sentry(0,data1); var : H3(0,data3),H5(0,data5); if data1(bdate != bdate[1]) Then { bentry = 0; sentry = 0; } if MarketPosition(0) == 1 and MarketPosition(0) != MarketPosition(0)[1] Then bentry = bentry+1; if MarketPosition(0) == -1 and MarketPosition(0) != MarketPosition(0)[1] Then sentry = sentry+1; if data3(bdate != bdate[1]) Then H3 = data3(H); if data3(H) > H3 Then H3 = data3(H); if data5(bdate != bdate[1]) Then H5 = Data5(H); if data5(H) > H5 Then H5 = data5(H); if Sentry < 1 and data2(C) <= H3 and DayHigh-PriceScale*55 Then Sell("s"); if Sentry < 1 and data2(C) <= H3 and DayOpen-PriceScale*55 Then Sell("ss"); if Bentry < 1 and data4(C) <= H5 and DayOpen+PriceScale*55 Then Buy("b"); if Bentry < 1 and data4(C) <= H5 and DayLow+PriceScale*55 Then Buy("bb"); 2 and DayHigh-PriceScale*55 Then 매수와 대도조건에 위와 같이 조건이 아닌 값만 지정된 부분들이 있습니다. 아래와 같이 조건이 들어가야 합니다. and C <= DayHigh-PriceScale*55 Then 즐거운 하루되세요 > 하늘북 님이 쓴 글입니다. > 제목 : 문의드립니다. > 안녕하세요? 아래 수식이 매수 매도 한번씩만 거래되어야 하는데 청산후 지속적으로 진입하는 현상이 발생합니다. 청산 :30틱 수익시 손절: 30틱 손실시 var : bentry(0,data1),sentry(0,data1); var : H3(0,data3),H5(0,data5); if data1(bdate != bdate[1]) Then { bentry = 0; sentry = 0; } if MarketPosition(0) == 1 and MarketPosition(0) != MarketPosition(0)[1] Then bentry = bentry+1; if MarketPosition(0) == -1 and MarketPosition(0) != MarketPosition(0)[1] Then sentry = sentry+1; if data3(bdate != bdate[1]) Then H3 = data3(H); if data3(H) > H3 Then H3 = data3(H); if data5(bdate != bdate[1]) Then H5 = Data5(H); if data5(H) > H5 Then H5 = data5(H); if bentry < 1 and data2(C) <= H3 and DayHigh-PriceScale*55 Then Sell("s"); if bentry < 1 and data2(C) <= H3 and DayOpen-PriceScale*55 Then Sell("ss"); if sentry < 1 and data4(C) <= H5 and DayOpen+PriceScale*55 Then Buy("b"); if sentry < 1 and data4(C) <= H5 and DayLow+PriceScale*55 Then Buy("bb");