커뮤니티

수식 문의드립니다.

프로필 이미지
하리마우
2020-03-26 09:24:21
492
글번호 137216
답변완료
input : profit(500),P(100); var1 = ma(C,P); Condition1 = C > var1 and C > DayClose(1); Condition2 = C < var1 and C < DayClose(1); if Condition1 == true and Condition1[1] == false Then buy("매수"); if MarketPosition == 1 then { if c >= EntryPrice*(1+profit/100) Then ExitLong("bp",OnClose,def,"",Floor(MaxContracts*0.5),1); if Condition2 == true and Condition2[1] == false Then ExitLong("bx"); if c < DayClose(1) Then ExitLong("bx3"); } if Condition2 == true and Condition2[1] == false Then sell("매도"); if MarketPosition == -1 then { if c <= EntryPrice*(1+profit/100) Then ExitLong("sp",OnClose,def,"",Floor(MaxContracts*0.5),1); if Condition1 == true and Condition1[1] == false Then ExitShort("sx"); if c > DayClose(1) Then ExitShort("sx3"); } 위 수식을 예스코인에서 테스트중입니다. 피라미딩 적용시 전진입가보다 낮을때만 재진입이 가능하도록 부탁드리고요, 수익이 500% 발생시익절할 수 있도록 변경부탁합니다^^ 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-03-26 13:01:18

안녕하세요 예스스탁입니다. 매도진입은 가능하지 않으므로 해당 부분은 삭제했습니다. input : profit(500),P(100); var1 = ma(C,P); Condition1 = C > var1 and C > DayClose(1); Condition2 = C < var1 and C < DayClose(1); if Condition1 == true and Condition1[1] == false Then { if MarketPosition == 0 Then buy("매수1"); if MarketPosition == 1 and c < LatestEntryPrice(0) Then buy("매수2"); } if MarketPosition == 1 then { ExitLong("bp",Atlimit,AvgEntryPrice*(1+profit/100)); if Condition2 == true and Condition2[1] == false Then ExitLong("bx"); if c < DayClose(1) Then ExitLong("bx3"); } 즐거운 하루되세요 > 하리마우 님이 쓴 글입니다. > 제목 : 수식 문의드립니다. > input : profit(500),P(100); var1 = ma(C,P); Condition1 = C > var1 and C > DayClose(1); Condition2 = C < var1 and C < DayClose(1); if Condition1 == true and Condition1[1] == false Then buy("매수"); if MarketPosition == 1 then { if c >= EntryPrice*(1+profit/100) Then ExitLong("bp",OnClose,def,"",Floor(MaxContracts*0.5),1); if Condition2 == true and Condition2[1] == false Then ExitLong("bx"); if c < DayClose(1) Then ExitLong("bx3"); } if Condition2 == true and Condition2[1] == false Then sell("매도"); if MarketPosition == -1 then { if c <= EntryPrice*(1+profit/100) Then ExitLong("sp",OnClose,def,"",Floor(MaxContracts*0.5),1); if Condition1 == true and Condition1[1] == false Then ExitShort("sx"); if c > DayClose(1) Then ExitShort("sx3"); } 위 수식을 예스코인에서 테스트중입니다. 피라미딩 적용시 전진입가보다 낮을때만 재진입이 가능하도록 부탁드리고요, 수익이 500% 발생시익절할 수 있도록 변경부탁합니다^^ 감사합니다.