커뮤니티
3가지 조건식 봐주십시요.
2016-09-21 01:57:57
105
글번호 102062
* 첨부 와 같이 했는데.... or 가 안먹히는데요.....안되는건가요?
if dayindex() >= 2
and (Sma1 <= Sma8 and c <= Sma8 and c >= ll and CrossUp(c,Sma2) and CrossUp(c,Sma3))
or ( CrossUp(Sma3,var5))
or (DayOpen<DayClose(1)*1.02 and C>= var12 and countif(c>= var12,100) >= 90 )
THEN buy("매수");
* or 들어가는부분이 안되는건가요?
기존은
식1 : Sma1 <= Sma8 and c <= Sma8 and c >= ll and CrossUp(c,Sma2) and CrossUp(c,Sma3)
식2 : CrossUp(Sma3,var5)
식3 : DayOpen<DayClose(1)*1.02 and C>= var12 and countif(c>= var12,100) >= 90
이것을 3개로 합했는데요.....
앙되요......
수정좀 요청 드림니다.
답변 1
예스스탁 예스스탁 답변
2016-09-21 16:18:22
안녕하세요
예스스탁입니다.
작성하신 식은 식1만 dayindex >= 2가 포함됩니다.
아래와 같이 작성하셔야
dayindex가 2이상일때
3개 중에 하나이상 만족하면 매수가 발생합니다.
Condition1 = Sma1 <= Sma8 and c <= Sma8 and c >= ll and CrossUp(c,Sma2) and CrossUp(c,Sma3);
Condition2 = CrossUp(Sma3,var5);
Condition3 = DayOpen<DayClose(1)*1.02 and C>= var12 and countif(c>= var12,100) >= 90;
if dayindex() >= 2 and
(Condition1 == true or Condition2 == true or Condition3 == true) THEN
buy("매수");
즐거운 하루되세요
> 요타 님이 쓴 글입니다.
> 제목 : 3가지 조건식 봐주십시요.
> * 첨부 와 같이 했는데.... or 가 안먹히는데요.....안되는건가요?
if dayindex() >= 2
and (Sma1 <= Sma8 and c <= Sma8 and c >= ll and CrossUp(c,Sma2) and CrossUp(c,Sma3))
or ( CrossUp(Sma3,var5))
or (DayOpen<DayClose(1)*1.02 and C>= var12 and countif(c>= var12,100) >= 90 )
THEN buy("매수");
* or 들어가는부분이 안되는건가요?
기존은
식1 : Sma1 <= Sma8 and c <= Sma8 and c >= ll and CrossUp(c,Sma2) and CrossUp(c,Sma3)
식2 : CrossUp(Sma3,var5)
식3 : DayOpen<DayClose(1)*1.02 and C>= var12 and countif(c>= var12,100) >= 90
이것을 3개로 합했는데요.....
앙되요......
수정좀 요청 드림니다.
다음글
이전글