커뮤니티

수식 작성 부탁 드립니다

프로필 이미지
뎅이요
2020-02-27 15:35:19
339
글번호 136418
답변완료
2개의 매수 진입 조건을 같이 사용 할수 있도록 부탁 드립니다 매수 진입 수식에 {input : period(20);} 이 상승 할때{CurrentBar > 20 and ma(haClose,period) > ma(haOpen,period) } 진입 허용 하도록 설정 되어 있습니다 아래 수식에서 input : period2(10);이 상승 할때 조건을 첨부 원합니다 input : period(20); var : haClose(0), haOpen(0), haHigh(0), haLow(0); if CurrentBar > 1 then { haClose = (Open+High+Low+Close)/4; haOpen = (haOpen[1] + haClose[1])/2 ; haHigh = Max(High, haOpen, haClose); haLow = Min(Low, haOpen, haClose) ; var1 = ma(haOpen,period); } } if CurrentBar > 20 then { if ma(haClose,period) > ma(haOpen,period) Then{ var2 =ma(haClose,period); } input : period2(10); var : haClose(0), haOpen(0), haHigh(0), haLow(0); if CurrentBar > 1 then { haClose = (Open+High+Low+Close)/4; haOpen = (haOpen[1] + haClose[1])/2 ; haHigh = Max(High, haOpen, haClose); haLow = Min(Low, haOpen, haClose) ; var3 = ma(haOpen,period2); } } if CurrentBar > 20 then { if ma(haClose,period2) > ma(haOpen,period2) Then{ var4 =ma(haClose,period2); } if CurrentBar > 20 and ma(haClose,period) > ma(haOpen,period) and 매수진입 조건 then buy("B");
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-02-28 10:11:16

안녕하세요 예스스탁입니다. input : period(20); input : period2(10); var : haClose(0), haOpen(0), haHigh(0), haLow(0); if CurrentBar > 1 then { haClose = (Open+High+Low+Close)/4; haOpen = (haOpen[1] + haClose[1])/2 ; haHigh = Max(High, haOpen, haClose); haLow = Min(Low, haOpen, haClose) ; var1 = ma(haClose,period); var2 = ma(haOpen,period); var3 = ma(haClose,period2); var4 = ma(haOpen,period2); } if CurrentBar > 20 and var1 > var2 and var3 > var3[1] then buy("B"); 즐거운 하루되세요 > 뎅이요 님이 쓴 글입니다. > 제목 : 수식 작성 부탁 드립니다 > 2개의 매수 진입 조건을 같이 사용 할수 있도록 부탁 드립니다 매수 진입 수식에 {input : period(20);} 이 상승 할때{CurrentBar > 20 and ma(haClose,period) > ma(haOpen,period) } 진입 허용 하도록 설정 되어 있습니다 아래 수식에서 input : period2(10);이 상승 할때 조건을 첨부 원합니다 input : period(20); var : haClose(0), haOpen(0), haHigh(0), haLow(0); if CurrentBar > 1 then { haClose = (Open+High+Low+Close)/4; haOpen = (haOpen[1] + haClose[1])/2 ; haHigh = Max(High, haOpen, haClose); haLow = Min(Low, haOpen, haClose) ; var1 = ma(haOpen,period); } } if CurrentBar > 20 then { if ma(haClose,period) > ma(haOpen,period) Then{ var2 =ma(haClose,period); } input : period2(10); var : haClose(0), haOpen(0), haHigh(0), haLow(0); if CurrentBar > 1 then { haClose = (Open+High+Low+Close)/4; haOpen = (haOpen[1] + haClose[1])/2 ; haHigh = Max(High, haOpen, haClose); haLow = Min(Low, haOpen, haClose) ; var3 = ma(haOpen,period2); } } if CurrentBar > 20 then { if ma(haClose,period2) > ma(haOpen,period2) Then{ var4 =ma(haClose,period2); } if CurrentBar > 20 and ma(haClose,period) > ma(haOpen,period) and 매수진입 조건 then buy("B");