커뮤니티

문의요

프로필 이미지
회원
2013-06-12 01:55:32
223
글번호 64233
답변완료
Input : Vol(0); //ma2 Input : maPeriod2(20); var : MAv2(0); MAv2 = ma(C,maPeriod2); //ma4 Input : ma청산(20); var : MAv5(0); MAv5 = ma(C,ma청산); //RSI Input : rsiPeriod(4); var : RSV(0); RSV = RSI(rsiPeriod); //MACD Input : shortPeriod(12), longPeriod(26),단기(1),장기(2); Var : MACDv(0), MACDsig1(0),macdsig2(0) ; MACDv = MACD(shortPeriod, longPeriod); MACDsig1 = ema(MACDv,단기); MACDsig2 = ema(MACDv,장기); if stime >= 180000 or stime < 030000 Then{ if V > Vol && crossup(c,MAv2) && RSV > 60 && MACDsig1 > MACDsig2 Then { Buy("Buy", OnClose, DEF,2); } if V > Vol && crossdown(C,MAv2) && RSV < 40 && MACDsig1 < MACDsig2 Then { sell ("Sell", OnClose, DEF,2); } //매수청산 if C < MAv5 Then ExitLong ("ExitLong"); //매도청산 if C > MAv5 Then ExitShort ("ExitShort"); } if MarketPosition == 1 and CurrentContracts == MaxContracts Then ExitLong("bx",AtStop,EntryPrice-PriceScale*3,"",1,1); if MarketPosition == -1 and CurrentContracts == MaxContracts Then ExitShort("sx",AtStop,EntryPrice+PriceScale*3,"",1,1); 2계약 진입후 한계약 +-5틱시 청산인데 청산이 안나오는듯해서요
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-06-12 10:17:03

안녕하세요 예스스탁입니다. 해당 청산식 정상적으로 신호가 발생하고 있습니다. 손절만 설정이 되어 있어 익절도 추가했습니다. Input : Vol(0); //ma2 Input : maPeriod2(20); var : MAv2(0); MAv2 = ma(C,maPeriod2); //ma4 Input : ma청산(20); var : MAv5(0); MAv5 = ma(C,ma청산); //RSI Input : rsiPeriod(4); var : RSV(0); RSV = RSI(rsiPeriod); //MACD Input : shortPeriod(12), longPeriod(26),단기(1),장기(2); Var : MACDv(0), MACDsig1(0),macdsig2(0) ; MACDv = MACD(shortPeriod, longPeriod); MACDsig1 = ema(MACDv,단기); MACDsig2 = ema(MACDv,장기); if stime >= 180000 or stime < 030000 Then{ if V > Vol && crossup(c,MAv2) && RSV > 60 && MACDsig1 > MACDsig2 Then { Buy("Buy", OnClose, DEF,2); } if V > Vol && crossdown(C,MAv2) && RSV < 40 && MACDsig1 < MACDsig2 Then { sell ("Sell", OnClose, DEF,2); } //매수청산 if C < MAv5 Then ExitLong ("ExitLong"); //매도청산 if C > MAv5 Then ExitShort ("ExitShort"); } if MarketPosition == 1 and CurrentContracts == MaxContracts Then{ ExitLong("BL",AtStop,EntryPrice-PriceScale*5,"",1,1); ExitLong("BP",AtLimit,EntryPrice+PriceScale*5,"",1,1); } if MarketPosition == -1 and CurrentContracts == MaxContracts Then{ ExitShort("SL",AtStop,EntryPrice+PriceScale*5,"",1,1); ExitShort("SP",AtLimit,EntryPrice-PriceScale*5,"",1,1); } 즐거운 하루되세요 > 나인밸류 님이 쓴 글입니다. > 제목 : 문의요 > Input : Vol(0); //ma2 Input : maPeriod2(20); var : MAv2(0); MAv2 = ma(C,maPeriod2); //ma4 Input : ma청산(20); var : MAv5(0); MAv5 = ma(C,ma청산); //RSI Input : rsiPeriod(4); var : RSV(0); RSV = RSI(rsiPeriod); //MACD Input : shortPeriod(12), longPeriod(26),단기(1),장기(2); Var : MACDv(0), MACDsig1(0),macdsig2(0) ; MACDv = MACD(shortPeriod, longPeriod); MACDsig1 = ema(MACDv,단기); MACDsig2 = ema(MACDv,장기); if stime >= 180000 or stime < 030000 Then{ if V > Vol && crossup(c,MAv2) && RSV > 60 && MACDsig1 > MACDsig2 Then { Buy("Buy", OnClose, DEF,2); } if V > Vol && crossdown(C,MAv2) && RSV < 40 && MACDsig1 < MACDsig2 Then { sell ("Sell", OnClose, DEF,2); } //매수청산 if C < MAv5 Then ExitLong ("ExitLong"); //매도청산 if C > MAv5 Then ExitShort ("ExitShort"); } if MarketPosition == 1 and CurrentContracts == MaxContracts Then ExitLong("bx",AtStop,EntryPrice-PriceScale*3,"",1,1); if MarketPosition == -1 and CurrentContracts == MaxContracts Then ExitShort("sx",AtStop,EntryPrice+PriceScale*3,"",1,1); 2계약 진입후 한계약 +-5틱시 청산인데 청산이 안나오는듯해서요