커뮤니티

분할매수오류문의

프로필 이미지
kobal321
2022-02-08 13:51:20
1131
글번호 156107
답변완료
안녕하세요. 간단한 분할매수 식을 일봉에서 구현하려는데 "b1" 신호 발생하고 다음봉에 발생해야할시 무슨일인지 "b2" 신호가 한봉 다음에발생합니다. 도움 부탁드립니다. if ma(c,60) > ma(c,120) and c > o then Buy("b1"); if MarketPosition == 1 Then { ExitLong("bx",atlimit, AvgEntryPrice * 1.10); if MaxEntries == 1 Then Buy("b2",atlimit,EntryPrice * 0.95); if MaxEntries == 2 Then Buy("b3",atlimit,EntryPrice * 0.90); if MaxEntries == 3 Then { Buy("b4",atlimit,EntryPrice * 0.80); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-02-08 14:47:07

안녕하세요 예스스탁입니다. 랭귀지의 if문은 봉완성 기준입니다. 봉완성시(다음봉시가수신) 조건만족하면 첫매수(b1)가 발생하는데 그 다음봉이 완성이 되어야 if MarketPosition == 1 Then 조건이 충족하게 됩니다. 또한 atlimit/atstop은 봉완성시 가격을 셋팅하고 다음봉 현재가와 비교를 합니다. 그러므로 b1신호다다음봉에 신호가 발생합니다. 추가진입신호가 첫신호 다음봉에서 바로 발생가능한 내용이면 아래와 같이 b1신호와 동시에 셋팅되는 내용을 추가하시면 됩니다. if MarketPosition == 0 and ma(c,60) > ma(c,120) and c > o then { Buy("b1"); #첫매수조건이 만족하면 지정한 가격을 셋팅해서 #매수 다음봉만 가격조건 충족하는 것을 감시 Buy("b2.",atlimit,EntryPrice * 0.95); Buy("b3.",atlimit,EntryPrice * 0.90); Buy("b4.",atlimit,EntryPrice * 0.80); } #첫매수후 다다음봉부터 지정한 가격조건 충족하면 매수 if MarketPosition == 1 Then { ExitLong("bx",atlimit, AvgEntryPrice * 1.10); if MaxEntries == 1 Then Buy("b2",atlimit,EntryPrice * 0.95); if MaxEntries == 2 Then Buy("b3",atlimit,EntryPrice * 0.90); if MaxEntries == 3 Then Buy("b4",atlimit,EntryPrice * 0.80); } 즐거운 하루되세요 > kobal321 님이 쓴 글입니다. > 제목 : 분할매수오류문의 > 안녕하세요. 간단한 분할매수 식을 일봉에서 구현하려는데 "b1" 신호 발생하고 다음봉에 발생해야할시 무슨일인지 "b2" 신호가 한봉 다음에발생합니다. 도움 부탁드립니다. if ma(c,60) > ma(c,120) and c > o then Buy("b1"); if MarketPosition == 1 Then { ExitLong("bx",atlimit, AvgEntryPrice * 1.10); if MaxEntries == 1 Then Buy("b2",atlimit,EntryPrice * 0.95); if MaxEntries == 2 Then Buy("b3",atlimit,EntryPrice * 0.90); if MaxEntries == 3 Then { Buy("b4",atlimit,EntryPrice * 0.80); }