커뮤니티

수정 부탁드립니다.

프로필 이미지
대구어린울프
2020-02-05 15:42:10
201
글번호 135662
답변완료
안녕하세요? 아래의 수식에서 손절이 정확히 되지가 않습니다. 지정한 손절범위에 되었다가 안되었다가 하고있습니다. 그리고 하루 매매횟수를 외부변수로 추가 부탁드립니다. 검토하여 수정부탁드립니다. 감사합니다. input :양봉틱수(5),음봉틱수(5),익절틱수(50),손절틱수(50); if MarketPosition == 0 and C == O+양봉틱수*PriceScale Then buy(); if MarketPosition == 0 and C == O-음봉틱수*PriceScale Then sell(); if MarketPosition == 1 Then sell("bs",AtStop,EntryPrice-PriceScale*손절틱수); if MarketPosition == 1 Then buy("sb",AtStop,EntryPrice+PriceScale*손절틱수); SetStopProfittarget(PriceScale*익절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-02-05 17:45:33

안녕하세요 예스스탁입니다. 진입이후 한봉이 완성되어야 값이 셋팅됩니다. 진입봉에서 같이 셋팅되어 청산되는 내용을 추가했습니다. input :양봉틱수(5),음봉틱수(5),익절틱수(50),손절틱수(50),진입횟수(3); var : entry(0); if bdate != bdate[1] Then { entry = 0; } if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if MarketPosition == 0 and C == O+양봉틱수*PriceScale and entry < 진입횟수 Then { buy("b"); sell("bs1",AtStop,c-PriceScale*손절틱수); } if MarketPosition == 0 and C == O-음봉틱수*PriceScale and entry < 진입횟수 Then { sell("s"); buy("sb1",AtStop,c+PriceScale*손절틱수); } if MarketPosition == 1 Then sell("bs",AtStop,EntryPrice-PriceScale*손절틱수); if MarketPosition == 1 Then buy("sb",AtStop,EntryPrice+PriceScale*손절틱수); SetStopProfittarget(PriceScale*익절틱수,PointStop); 즐거운 하루되세요 > 대구어린울프 님이 쓴 글입니다. > 제목 : 수정 부탁드립니다. > 안녕하세요? 아래의 수식에서 손절이 정확히 되지가 않습니다. 지정한 손절범위에 되었다가 안되었다가 하고있습니다. 그리고 하루 매매횟수를 외부변수로 추가 부탁드립니다. 검토하여 수정부탁드립니다. 감사합니다. input :양봉틱수(5),음봉틱수(5),익절틱수(50),손절틱수(50); if MarketPosition == 0 and C == O+양봉틱수*PriceScale Then buy(); if MarketPosition == 0 and C == O-음봉틱수*PriceScale Then sell(); if MarketPosition == 1 Then sell("bs",AtStop,EntryPrice-PriceScale*손절틱수); if MarketPosition == 1 Then buy("sb",AtStop,EntryPrice+PriceScale*손절틱수); SetStopProfittarget(PriceScale*익절틱수,PointStop);