커뮤니티

다시부탁드립니다

프로필 이미지
수원
2017-09-20 19:14:11
107
글번호 112935
답변완료
아래식에서 진입하여 청산하고 손실이100틱이상이면 다음신호는 진입하지않게 수정부탁합니다 (진입중에는 손실이100틱이어도 강제청산하진 않습니다) Input : shortPeriod(30),longPeriod(500); value1 =wma(C, shortPeriod); value2 = wma(C, longPeriod); var : HH(0),LL(0); var : cnt(0),count(0); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } if count < 30 Then{ if stime >= 102000 and stime < 152000 Then{ # 매수/매도청산 If CrossUP(value1, value2) Then { buy(); } # 매도/매수청산 If CrossDown(value1, value2) Then { sell(); } } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-09-21 12:23:46

안녕하세요 예스스탁입니다. Input : shortPeriod(30),longPeriod(500); value1 =wma(C, shortPeriod); value2 = wma(C, longPeriod); var : HH(0),LL(0); var : cnt(0),count(0); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } if bdate != bdate[1] Then Condition1 = false; if TotalTrades > TotalTrades[1] Then{ if MarketPosition == 1 and ExitPrice(1) <= EntryPrice(1)-PriceScale*100 Then Condition1 = true; if MarketPosition == -1 and ExitPrice(1) >= EntryPrice(1)+PriceScale*100 Then Condition1 = true; } if count < 30 Then{ if stime >= 102000 and stime < 152000 Then{ If CrossUP(value1, value2) Then { if MarketPosition == 0 and Condition1 == false then buy(); if MarketPosition == -1 Then{ if C >= EntryPrice+PriceScale*100 then{ ExitShort(); Condition1 = true; } Else buy(); } } If CrossDown(value1, value2) Then { if MarketPosition == 0 and Condition1 == false then buy(); if MarketPosition == 1 Then{ if C <= EntryPrice-PriceScale*100 then{ ExitLong(); Condition1 = true; } Else sell(); } } } } 즐거운 하루되세요 > 수원 님이 쓴 글입니다. > 제목 : 다시부탁드립니다 > 아래식에서 진입하여 청산하고 손실이100틱이상이면 다음신호는 진입하지않게 수정부탁합니다 (진입중에는 손실이100틱이어도 강제청산하진 않습니다) Input : shortPeriod(30),longPeriod(500); value1 =wma(C, shortPeriod); value2 = wma(C, longPeriod); var : HH(0),LL(0); var : cnt(0),count(0); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } if count < 30 Then{ if stime >= 102000 and stime < 152000 Then{ # 매수/매도청산 If CrossUP(value1, value2) Then { buy(); } # 매도/매수청산 If CrossDown(value1, value2) Then { sell(); } } }