커뮤니티

문의드립니다

프로필 이미지
푸른
2023-04-26 07:02:19
803
글번호 168489
답변완료

첨부 이미지

input : n(1),손절틱수(0),익절틱수(0); var : cnt(0),hh(0),ll(0); hh = 0; ll = 0; For cnt = 0 to n-1 { if hh == 0 or (hh > 0 and DayHigh(cnt) > hh) Then hh = DayHigh(cnt); if ll == 0 or (ll > 0 and DayLow(cnt) < ll) Then ll = DayLow(cnt); } Buy("b",AtLimit,hh-(hh-ll)*0.510); ExitLong("sx",AtLimit,hh-(hh-ll)*-0.500); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopProfittarget(PriceScale*익절틱수,PointStop); ------------- 첨부파일의 내용과 위 수식어는 참고될 수식어 입니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-04-26 13:13:57

안녕하세요 예스스탁입니다. 분봉에 적용하셔야 합니다. input : n(1),손절틱수(0),익절틱수(0); var : cnt(0),hh(0),ll(0); #전일기준 n일간 최고가/최저가 hh = 0; ll = 0; For cnt = 1 to n { if hh == 0 or (hh > 0 and DayHigh(cnt) > hh) Then hh = DayHigh(cnt); if ll == 0 or (ll > 0 and DayLow(cnt) < ll) Then ll = DayLow(cnt); } #당일최고가-전일폭의61.8% 만큼 하락하면 매수 if MarketPosition == 0 Then Buy("b1",AtLimit,DayHigh-(HH-LL)*0.618); #매수 후 당일폭의 산단 23.6%에 도달하면 청산 if MarketPosition == 1 Then ExitLong("bx",AtStop,DayHigh-(DayHigh-DayLow)*0.236); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopProfittarget(PriceScale*익절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의드립니다 > input : n(1),손절틱수(0),익절틱수(0); var : cnt(0),hh(0),ll(0); hh = 0; ll = 0; For cnt = 0 to n-1 { if hh == 0 or (hh > 0 and DayHigh(cnt) > hh) Then hh = DayHigh(cnt); if ll == 0 or (ll > 0 and DayLow(cnt) < ll) Then ll = DayLow(cnt); } Buy("b",AtLimit,hh-(hh-ll)*0.510); ExitLong("sx",AtLimit,hh-(hh-ll)*-0.500); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopProfittarget(PriceScale*익절틱수,PointStop); ------------- 첨부파일의 내용과 위 수식어는 참고될 수식어 입니다.