커뮤니티

분할매수

프로필 이미지
kobal321
2022-02-15 22:22:42
1268
글번호 156333
답변완료

첨부 이미지

먼저 감사드립니다. 아래 보내주신 수정프로그램 실행시 다음봉에 매수신호는 발생하여 처리가능한데 b2. b3. b4. 신호가 동시에 발생합니다. 조언부탁드립니다. 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); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-02-16 11:35:17

안녕하세요 예스스탁입니다. 식을 수정했습니다. b1과 동시셋팅되는 "b2.","b3.","b3."신호는 EntryPrice가 아닌 종가로 지정되어야 합니다. if MarketPosition == 0 and ma(c,60) > ma(c,120) and c > o then { Buy("b1"); #첫매수조건이 만족하면 지정한 가격을 셋팅해서 #매수 다음봉만 가격조건 충족하는 것을 감시 Buy("b2.",atlimit,c * 0.95); Buy("b3.",atlimit,c * 0.90); Buy("b4.",atlimit,c * 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 님이 쓴 글입니다. > 제목 : 분할매수 > 먼저 감사드립니다. 아래 보내주신 수정프로그램 실행시 다음봉에 매수신호는 발생하여 처리가능한데 b2. b3. b4. 신호가 동시에 발생합니다. 조언부탁드립니다. 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); }