커뮤니티

데이트레이딩 동일방향 진입제어 문의

프로필 이미지
ft
2014-02-03 17:54:29
157
글번호 72110
답변완료
아래 수식은 데이 트레이딩에서, 당일 매수/매도 조건이 만족할때 각각 1회만 진입하는 수식 입니다. 수식에 문제가 없는지 문의 드립니다. inputs : pp(0.001); Var : count(0), cnt(0), bcount(0), scount(0) ; count=0; bcount=0; scount=0; For cnt=0 To 20{ If sDate==EntryDate(cnt) Then count=count+1; If MarketPosition(cnt)==1 Then bcount=bcount+1; If MarketPosition(cnt)==-1 Then scount=scount+1; } If count==0 Then{ If C>DayOpen()*(1+pp) Then buy("매수"); If C<DayOpen()*(1-pp) Then sell("매도");} If count>0 and bcount==0 Then{ If C>DayOpen()*(1+pp) Then buy("매수1");} If count>0 and scount==0 Then{ If C<DayOpen()*(1-pp) Then sell("매도1");}
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-02-03 18:26:09

안녕하세요 예스스탁입니다. 매수와 매도의 횟수를 지정하는 식이므로 아래 같이만 작성하시면 됩니다. inputs : pp(0.001); Var : count(0), cnt(0), bcount(0), scount(0) ; bcount=0; scount=0; For cnt=0 To 20{ If sdate == EntryDate(cnt) and MarketPosition(cnt)==1 Then bcount=bcount+1; If sdate == EntryDate(cnt) and MarketPosition(cnt)==-1 Then scount=scount+1; } If C > DayOpen()*(1+pp) and Bcount < 1 Then buy("매수"); If C < DayOpen()*(1-pp) and Scount < 1 Then sell("매도"); 즐거운 하루되세요 > ft 님이 쓴 글입니다. > 제목 : 데이트레이딩 동일방향 진입제어 문의 > 아래 수식은 데이 트레이딩에서, 당일 매수/매도 조건이 만족할때 각각 1회만 진입하는 수식 입니다. 수식에 문제가 없는지 문의 드립니다. inputs : pp(0.001); Var : count(0), cnt(0), bcount(0), scount(0) ; count=0; bcount=0; scount=0; For cnt=0 To 20{ If sDate==EntryDate(cnt) Then count=count+1; If MarketPosition(cnt)==1 Then bcount=bcount+1; If MarketPosition(cnt)==-1 Then scount=scount+1; } If count==0 Then{ If C>DayOpen()*(1+pp) Then buy("매수"); If C<DayOpen()*(1-pp) Then sell("매도");} If count>0 and bcount==0 Then{ If C>DayOpen()*(1+pp) Then buy("매수1");} If count>0 and scount==0 Then{ If C<DayOpen()*(1-pp) Then sell("매도1");}