커뮤니티

문의드립니다

프로필 이미지
처음처럼22
2025-10-15 04:50:48.0
32
글번호 194641
답변완료
수정부탁드립니다 그리고 설명도부탁드립니다 Inputs: N(14), MA_Period(20), Smooth(3), ThrBuy(70), ThrSell(55), Eps(1e-9), AllowShort(1), Qty(1); // 주문 수량 Vars: ma(0), rsi(0), obv(0), obvMin(0), obvMax(0), obvZ(0), maMin(0), maMax(0), maZ(0), combo(0), comboSm(0), buySig(false), sellSig(false), mp(0); // --- 지표 계산 --- ma = MA(Close, MA_Period); rsi = RSI(N); obv = OBV(); obvMin = Lowest(obv, N); obvMax = Highest(obv, N); maMin = Lowest(ma, N); maMax = Highest(ma, N); obvZ = 100 * (obv - obvMin) / Max(Eps, obvMax - obvMin); maZ = 100 * (ma - maMin) / Max(Eps, maMax - maMin); combo = (obvZ + rsi + maZ) / 3; comboSm = MA(combo, Smooth); // --- 트리거 --- buySig = CrossUp(comboSm, ThrBuy); sellSig = CrossDown(comboSm, ThrSell); // --- 포지션 & 주문 --- mp = MarketPosition(); If mp == 0 then begin if buySig then Buy(Qty); // 롱 진입 if (AllowShort == 1) and sellSig then Short(Qty); // 숏 진입 end else if mp == 1 then begin if sellSig then Sell(Qty); // 롱 청산 end else if mp == -1 then begin if buySig then Cover(Qty); // 숏 청산 end;
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-10-15 16:08:38.0

안녕하세요 예스스탁입니다. 매수진입은 buy, 매수청산은 exitlong 매도진입은 sell, 매도청산은 exitshort입니다. Inputs: N(14), MA_Period(20), Smooth(3), ThrBuy(70), ThrSell(55), Eps(1e-9), AllowShort(1), Qty(1); // 주문 수량 Vars: ma(0), rsi(0), obv(0), obvMin(0), obvMax(0), obvZ(0), maMin(0), maMax(0), maZ(0), combo(0), comboSm(0), buySig(false), sellSig(false), mp(0); // --- 지표 계산 --- ma = MA(Close, MA_Period); rsi = RSI(N); obv = OBV(); obvMin = Lowest(obv, N); obvMax = Highest(obv, N); maMin = Lowest(ma, N); maMax = Highest(ma, N); obvZ = 100 * (obv - obvMin) / Max(Eps, obvMax - obvMin); maZ = 100 * (ma - maMin) / Max(Eps, maMax - maMin); combo = (obvZ + rsi + maZ) / 3; comboSm = MA(combo, Smooth); // --- 트리거 --- buySig = CrossUp(comboSm, ThrBuy); sellSig = CrossDown(comboSm, ThrSell); // --- 포지션 & 주문 --- mp = MarketPosition(); If mp == 0 then begin if buySig then Buy("b",onclose,def, Qty); // 롱 진입 if (AllowShort == 1) and sellSig then Sell("s",OnClose,Def,Qty); // 숏 진입 end else if mp == 1 then begin if sellSig then ExitLong(); // 롱 청산 end else if mp == -1 then begin if buySig then ExitShort(); // 숏 청산 end; 즐거운 하루되세요 > 처음처럼22 님이 쓴 글입니다. > 제목 : 문의드립니다 > 수정부탁드립니다 그리고 설명도부탁드립니다 Inputs: N(14), MA_Period(20), Smooth(3), ThrBuy(70), ThrSell(55), Eps(1e-9), AllowShort(1), Qty(1); // 주문 수량 Vars: ma(0), rsi(0), obv(0), obvMin(0), obvMax(0), obvZ(0), maMin(0), maMax(0), maZ(0), combo(0), comboSm(0), buySig(false), sellSig(false), mp(0); // --- 지표 계산 --- ma = MA(Close, MA_Period); rsi = RSI(N); obv = OBV(); obvMin = Lowest(obv, N); obvMax = Highest(obv, N); maMin = Lowest(ma, N); maMax = Highest(ma, N); obvZ = 100 * (obv - obvMin) / Max(Eps, obvMax - obvMin); maZ = 100 * (ma - maMin) / Max(Eps, maMax - maMin); combo = (obvZ + rsi + maZ) / 3; comboSm = MA(combo, Smooth); // --- 트리거 --- buySig = CrossUp(comboSm, ThrBuy); sellSig = CrossDown(comboSm, ThrSell); // --- 포지션 & 주문 --- mp = MarketPosition(); If mp == 0 then begin if buySig then Buy(Qty); // 롱 진입 if (AllowShort == 1) and sellSig then Short(Qty); // 숏 진입 end else if mp == 1 then begin if sellSig then Sell(Qty); // 롱 청산 end else if mp == -1 then begin if buySig then Cover(Qty); // 숏 청산 end;