커뮤니티

문의 드립니다..(편차-변동성)

프로필 이미지
머니사이언스
2017-04-03 20:43:56
234
글번호 108378
답변완료
안녕하세요..아래식을 짰는데 저는 10시 반 이후에 체결되도록 해 놨는데 그냥 장 초반에 거래가 체결되더라구요.. 뭐가 문제인지 몰라서 올립니다.. 식 검토 부탁드립니다.. 참고로 저는 5분봉 띄워서 하는데 10시 반 이후로 체결되기를 원하는데 9시 5분에 걸려요.. ------------------------------------------------------------------- Input: StdDv(1), Length(50), AtrMult(7), W(2), Y(40); Vars: TopBand(0), BotBand(0), BandRange(0), SellPrice(0), BuyPrice(0), mp(0), HighV(0), LowV(0); //Setup calculations - calculating bands & buy and sell prices TopBand = ma(Close, Length) + Std(C, Length) * StdDv; BotBand = ma(Close, Length) - Std(C, Length) * StdDv; BandRange = TopBand - BotBand; BuyPrice = Close * ( 1 + BandRange / ma(Close, W) ); Sellprice = Close * ( 1 - BandRange / ma(Close, W) ) ; // Entry orders if stime >= 103000 then Buy("B",atstop,BuyPrice); if stime >= 103000 then Sell("S",atstop,SellPrice); // Chandelier Exit mp = MarketPosition; HighV = highest(H, BarsSinceEntry+1); LowV = Lowest(L,BarsSinceEntry+1); if mp == 1 then exitlong("EL", atstop, HighV-ATR(Y)*AtrMult); if mp == -1 then ExitShort("ES", atstop, LowV+ATR(Y)*AtrMult); //당일청산 SetStopEndofday(1442);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-04-03 14:33:46

안녕하세요 예스스탁입니다. atstop타입이 봉완성시 조건만족하면 가격을 셋팅하고 다음봉의 현재가와 셋팅된 가격을 비교해 신호를 발생합니다. 당일마지막봉(stime >= 10300 조건만족)에서 값이 셋팅되면 다음날 첫봉에서 신호가 발생하므로 특정 시간 이후에 셋팅되지 않게 시간조건을 추가해 주셔야 합니다. Input: StdDv(1), Length(50), AtrMult(7), W(2), Y(40); Vars: TopBand(0), BotBand(0), BandRange(0), SellPrice(0), BuyPrice(0), mp(0), HighV(0), LowV(0); //Setup calculations - calculating bands & buy and sell prices TopBand = ma(Close, Length) + Std(C, Length) * StdDv; BotBand = ma(Close, Length) - Std(C, Length) * StdDv; BandRange = TopBand - BotBand; BuyPrice = Close * ( 1 + BandRange / ma(Close, W) ); Sellprice = Close * ( 1 - BandRange / ma(Close, W) ) ; // Entry orders if stime >= 103000 and stime < 144200 then Buy("B",atstop,BuyPrice); if stime >= 103000 and stime < 144200 then Sell("S",atstop,SellPrice); // Chandelier Exit mp = MarketPosition; HighV = highest(H, BarsSinceEntry+1); LowV = Lowest(L,BarsSinceEntry+1); if mp == 1 then exitlong("EL", atstop, HighV-ATR(Y)*AtrMult); if mp == -1 then ExitShort("ES", atstop, LowV+ATR(Y)*AtrMult); //당일청산 SetStopEndofday(1442); 즐거운 하루되세요 > 머니사이언스 님이 쓴 글입니다. > 제목 : 문의 드립니다.. > 안녕하세요..아래식을 짰는데 저는 10시 반 이후에 체결되도록 해 놨는데 그냥 장 초반에 거래가 체결되더라구요.. 뭐가 문제인지 몰라서 올립니다.. 식 검토 부탁드립니다.. 참고로 저는 5분봉 띄워서 하는데 10시 반 이후로 체결되기를 원하는데 9시 5분에 걸려요.. ------------------------------------------------------------------- Input: StdDv(1), Length(50), AtrMult(7), W(2), Y(40); Vars: TopBand(0), BotBand(0), BandRange(0), SellPrice(0), BuyPrice(0), mp(0), HighV(0), LowV(0); //Setup calculations - calculating bands & buy and sell prices TopBand = ma(Close, Length) + Std(C, Length) * StdDv; BotBand = ma(Close, Length) - Std(C, Length) * StdDv; BandRange = TopBand - BotBand; BuyPrice = Close * ( 1 + BandRange / ma(Close, W) ); Sellprice = Close * ( 1 - BandRange / ma(Close, W) ) ; // Entry orders if stime >= 103000 then Buy("B",atstop,BuyPrice); if stime >= 103000 then Sell("S",atstop,SellPrice); // Chandelier Exit mp = MarketPosition; HighV = highest(H, BarsSinceEntry+1); LowV = Lowest(L,BarsSinceEntry+1); if mp == 1 then exitlong("EL", atstop, HighV-ATR(Y)*AtrMult); if mp == -1 then ExitShort("ES", atstop, LowV+ATR(Y)*AtrMult); //당일청산 SetStopEndofday(1442);