커뮤니티
수식 오류 - 재문의
2018-09-07 09:48:51
173
글번호 121847
please check attaschment.
always thank you
답변 1
예스스탁 예스스탁 답변
2018-09-07 09:18:27
안녕하세요
예스스탁입니다.
식을 수정했습니다
input : n(10),X(5);
plus = 0;
if Var3 > 0 Then
plus = plus+1;
if Var9 > 0 Then
plus = plus+1;
if var15 > 0 Then
plus = plus+1;
if var21 > 0 Then
plus = plus+1;
minus = 0;
if var3 < 0 Then
minus = minus+1;
if Var9 < 0 Then
minus = minus+1;
if var15 < 0 Then
minus = minus+1;
if var21 < 0 Then
minus = minus+1;
if (bdate != bdate[1] and plus >= 3) or
(bdate == bdate[1] and plus >= 3 and plus[1] <= 2) Then
{
if MarketPosition <= 0 or (MarketPosition == 1 and C <= LatestEntryPrice(0)-PriceScale*x and index < var1+n) Then
buy("p.");
}
if (bdate != bdate[1] and plus >= 4) or
(bdate == bdate[1] and plus >= 4 and plus[1] <= 3) Then
{
if MarketPosition <= 0 or (MarketPosition == 1 and C <= LatestEntryPrice(0)-PriceScale*x and index < var1+n) Then
buy(".p.");
}
if (bdate != bdate[1] and minus >= 3) or
(bdate == bdate[1] and minus >= 3 and minus[1] <= 2) Then
{
if MarketPosition >= 0 or (MarketPosition == -1 and C >= LatestEntryPrice(0)+PriceScale*x and index < var1+n) Then
sell("p,");
}
if (bdate != bdate[1] and minus >= 4) or
(bdate == bdate[1] and minus >= 4 and minus[1] <= 3) Then
{
if MarketPosition <= 0 or (MarketPosition == -1 and C >= LatestEntryPrice(0)+PriceScale*x and index < var1+n) Then
sell(",p,");
}
if MarketPosition == 1 and CurrentContracts > CurrentContracts[1] Then
var1 = index;
if MarketPosition == -1 and CurrentContracts > CurrentContracts[1] Then
var2 = index;
즐거운 하루되세요
---문의내용---
도움주심에 힘입어,
임의의 조건값 var3,9,15,21을 이용하여
다음과 같은 진입신호를 만들었습니다.
plus = 0;
if Var3 > 0 Then
plus = plus+1;
if Var9 > 0 Then
plus = plus+1;
if var15 > 0 Then
plus = plus+1;
if var21 > 0 Then
plus = plus+1;
minus = 0;
if var3 < 0 Then
minus = minus+1;
if Var9 < 0 Then
minus = minus+1;
if var15 < 0 Then
minus = minus+1;
if var21 < 0 Then
minus = minus+1;
if (bdate != bdate[1] and plus >= 3) or
(bdate == bdate[1] and plus >= 3 and plus[1] <= 2) Then
{
if MarketPosition <= 0 or (MarketPosition == 1 and C < LatestEntryPrice(0)) Then
buy("p.");
}
if (bdate != bdate[1] and plus >= 4) or
(bdate == bdate[1] and plus >= 4 and plus[1] <= 3) Then
{
if MarketPosition <= 0 or (MarketPosition == 1 and C < LatestEntryPrice(0)) Then
buy(".p.");
}
if (bdate != bdate[1] and minus >= 3) or
(bdate == bdate[1] and minus >= 3 and minus[1] <= 2) Then
{
if MarketPosition >= 0 or (MarketPosition == -1 and C > LatestEntryPrice(0)) Then
sell("p,");
}
if (bdate != bdate[1] and minus >= 4) or
(bdate == bdate[1] and minus >= 4 and minus[1] <= 3) Then
{
if MarketPosition <= 0 or (MarketPosition == -1 and C > LatestEntryPrice(0)) Then
sell(",p,");
}
지난 번, 수식문의 때 요청 드릴 때,
매수 신호가 발생하고
ㄱ.
n봉 이내에
추가 매수 진입 신호가 발생할 경우,
ㄴ.
추가 매수 신호 봉의 종가가
직전 매수 진입 신호가 발생한 봉의
(종가 -n틱)보다 높다면,
ㄷ.
해당 진입 매수 신호는 진입 하지 않음.
ㄹ.
다른 진입신호인 경우에도 ㄱ,ㄴ 의 조건이 충족되면
진입을 허용하지 않음
라고 요청 드렸었는데요,
(매도 신호 역으로 동일)
제가 수식은 잘 모르지만,
위의 조건을 수행하려면,
직전 매수신호 발생 이후 (( n봉 이내 )), 라는 조건과
직전 진입 신호 발생봉의 종가 (( -n틱 )) 이라는 조건을
input : 으로 설정해 주어야 할 것 같은데, 그게 없네요.
그리고, ㄹ 부분도 추가 하오니 함께, 주시면 좋겠습니다.
다시한번 살펴봐 주시기 바랍니다.
항상 친절한 답변 감사합니다.
윈도우가 러시아어 버젼이라
입력이 불편하고 오류가 나서
첨부파일로 드리는 점 양해 바랍니다.
감사합니다.
> 흑수돌 님이 쓴 글입니다.
> 제목 : 수식 오류 - 재문의
> please check attaschment.
always thank you