커뮤니티

문의

프로필 이미지
erwe343
2015-04-14 03:53:54
132
글번호 85014
답변완료
아래식 두개가 주식이나 ETF에서 전혀 작동되지 않으니 교정해 주세요. 1. input : 날짜(20150105),Per(0.25),Profit(1.5); if sdate == 날짜 and MarketPosition == 0 Then buy("b"); if MarketPosition == 1 Then{ if C <= LatestEntryPrice(0)*(1-Per/100) Then buy("bb"); if C >= AvgEntryPrice*(1+Profit/100) Then exitlong("bx"); } 2. input : 날짜(20150331); if (sdate == 날짜 and dayindex == 0 and MarketPosition == 0) And (sdate >= 날짜 and MarketPosition == 0 and IsExitName("bx",1) == true and BarsSinceExit(1) == 1) Then buy("b"); if MarketPosition == 1 Then{ if C <= LatestEntryPrice(0)-25 Then buy("bb"); if C >= AvgEntryPrice*1.015 Then exitlong("bx"); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-04-14 14:46:47

안녕하세요 예스스탁입니다. 1번식은 첨부된 그림과 같이 해당식 주식과 ETF에서도 신호가 발생합니다. 날짜,per,prfoit만 조절하시면 됩니다. 2번식은 진입조건 수정해 드립니다. 또한 수익과 손실액 지정하는 외부변수 추가해 드립니다. 2번식은 손실이 %아닌 최근진입가-25로 되어 있습니다. 원단위로 지정하셔야 합니다. 2번 input : 날짜(20150331),loss(25),profit(1.5); if (sdate == 날짜 and dayindex == 0 and MarketPosition == 0) or (sdate >= 날짜 and MarketPosition == 0 and IsExitName("bx",1) == true and BarsSinceExit(1) == 1) Then buy("b"); if MarketPosition == 1 Then{ if C <= LatestEntryPrice(0)-loss Then buy("bb"); if C >= AvgEntryPrice*(1+Profit/100) Then exitlong("bx"); } 즐거운 하루되세요 > erwe343 님이 쓴 글입니다. > 제목 : 문의 > 아래식 두개가 주식이나 ETF에서 전혀 작동되지 않으니 교정해 주세요. 1. input : 날짜(20150105),Per(0.25),Profit(1.5); if sdate == 날짜 and MarketPosition == 0 Then buy("b"); if MarketPosition == 1 Then{ if C <= LatestEntryPrice(0)*(1-Per/100) Then buy("bb"); if C >= AvgEntryPrice*(1+Profit/100) Then exitlong("bx"); } 2. input : 날짜(20150331); if (sdate == 날짜 and dayindex == 0 and MarketPosition == 0) And (sdate >= 날짜 and MarketPosition == 0 and IsExitName("bx",1) == true and BarsSinceExit(1) == 1) Then buy("b"); if MarketPosition == 1 Then{ if C <= LatestEntryPrice(0)-25 Then buy("bb"); if C >= AvgEntryPrice*1.015 Then exitlong("bx"); }