커뮤니티

기준라인수식 결과

프로필 이미지
목마와숙녀
2020-01-20 11:57:46
240
글번호 130590
답변완료

첨부 이미지

데스크탑 cpu 8코어는 1분봉 사용시 2018년부터 시작해야 결과물 누락이 없고 노트북 cpu 4코어는 1분봉 사용시 2015년부터 시작해도 결과물이 잘 나옵니다. 데스크탑으로 이것 저것 해보니 3분봉에서 2015년부터의 결과물이 나옵니다. 그래서 아래 조건으로 시뮬레이션을 해보니 별첨처럼 잘못 진입하는 케이스를 발견했습니다. 진입가격은 264.00인데 2018년 11월 2일에 266.08에 진입하였습니다. 노트북 1분봉에서 같은 조건으로 시뮬레이션 해봐도 2018년 11월 2일에 266.08 진입이 발생합니다. 데스크탑 3분봉 기준 263.00 상승 1.00 (진입가격은 264.00) 피라미딩 설정 당일청산 오후2시45분 ******************************************************************************** input : 기준(263),상승(1.00); input : 손절1(50),익절1(300),TR1(150); input : 손절2(50),익절2(300),TR2(150); input : 손절3(50),익절3(300),TR3(150); input : 손절4(50),익절4(300),TR4(150); input : 손절5(50),익절5(300),TR5(150); input : 손절6(50),익절6(300),TR6(150); input : 손절7(50),익절7(300),TR7(150); input : 손절8(50),익절8(300),TR8(150); input : 손절9(50),익절9(300),TR9(150); input : 손절10(50),익절10(300),TR10(150); input : 손절11(50),익절11(300),TR11(150); input : 손절12(50),익절12(300),TR12(150); Array : EP[20](0); if MarketPosition == 0 and H < 기준+상승 and ExitDate(1) != sdate Then buy("b1",AtStop,기준+상승); if MarketPosition == 1 Then { var1 = (기준+상승) + 상승*MaxEntries; EP[MaxEntries] = LatestEntryPrice(0); if MaxEntries == 1 and H < var1 Then buy("b2",AtStop,var1); if MaxEntries == 2 and H < var1 Then buy("b3",AtStop,var1); if MaxEntries == 3 and H < var1 Then buy("b4",AtStop,var1); if MaxEntries == 4 and H < var1 Then buy("b5",AtStop,var1); if MaxEntries == 5 and H < var1 Then buy("b6",AtStop,var1); if MaxEntries == 6 and H < var1 Then buy("b7",AtStop,var1); if MaxEntries == 7 and H < var1 Then buy("b8",AtStop,var1); if MaxEntries == 8 and H < var1 Then buy("b9",AtStop,var1); if MaxEntries == 9 and H < var1 Then buy("b10",AtStop,var1); if MaxEntries == 10 and H < var1 Then buy("b11",AtStop,var1); if MaxEntries == 11 and H < var1 Then buy("b12",AtStop,var1); if MaxEntries >= 1 and EP[1] > 0 Then { ExitLong("bl1",AtStop,EP[1]-PriceScale*손절1,"b1"); ExitLong("bp1",Atlimit,EP[1]+PriceScale*익절1,"b1"); ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR1,"b1"); } if MaxEntries >= 2 and EP[2] > 0 Then { ExitLong("bl2",AtStop,EP[2]-PriceScale*손절2,"b2"); ExitLong("bp2",Atlimit,EP[2]+PriceScale*익절2,"b2"); ExitLong("btr2",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR2,"b2"); } if MaxEntries >= 3 and EP[3] > 0 Then { ExitLong("bl3",AtStop,EP[3]-PriceScale*손절3,"b3"); ExitLong("bp3",Atlimit,EP[3]+PriceScale*익절3,"b3"); ExitLong("btr3",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR3,"b3"); } if MaxEntries >= 4 and EP[4] > 0 Then { ExitLong("bl4",AtStop,EP[4]-PriceScale*손절4,"b4"); ExitLong("bp4",Atlimit,EP[4]+PriceScale*익절4,"b4"); ExitLong("btr4",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR4,"b4"); } if MaxEntries >= 5 and EP[5] > 0 Then { ExitLong("bl5",AtStop,EP[5]-PriceScale*손절5,"b5"); ExitLong("bp5",Atlimit,EP[5]+PriceScale*익절5,"b5"); ExitLong("btr5",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR5,"b5"); } if MaxEntries >= 6 and EP[6] > 0 Then { ExitLong("bl6",AtStop,EP[6]-PriceScale*손절6,"b6"); ExitLong("bp6",Atlimit,EP[6]+PriceScale*익절6,"b6"); ExitLong("btr6",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR6,"b6"); } if MaxEntries >= 7 and EP[7] > 0 Then { ExitLong("bl7",AtStop,EP[7]-PriceScale*손절7,"b7"); ExitLong("bp7",Atlimit,EP[7]+PriceScale*익절7,"b7"); ExitLong("btr7",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR7,"b7"); } if MaxEntries >= 8 and EP[8] > 0 Then { ExitLong("bl8",AtStop,EP[8]-PriceScale*손절8,"b8"); ExitLong("bp8",Atlimit,EP[8]+PriceScale*익절8,"b8"); ExitLong("btr8",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR8,"b8"); } if MaxEntries >= 9 and EP[9] > 0 Then { ExitLong("bl9",AtStop,EP[9]-PriceScale*손절9,"b9"); ExitLong("bp9",Atlimit,EP[9]+PriceScale*익절9,"b9"); ExitLong("btr9",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR9,"b9"); } if MaxEntries >= 10 and EP[10] > 0 Then { ExitLong("bl10",AtStop,EP[10]-PriceScale*손절10,"b10"); ExitLong("bp10",Atlimit,EP[10]+PriceScale*익절10,"b10"); ExitLong("btr10",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR10,"b10"); } if MaxEntries >= 11 and EP[11] > 0 Then { ExitLong("bl11",AtStop,EP[11]-PriceScale*손절11,"b11"); ExitLong("bp11",Atlimit,EP[11]+PriceScale*익절11,"b11"); ExitLong("btr11",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR11,"b11"); } if MaxEntries >= 12 and EP[12] > 0 Then { ExitLong("bl12",AtStop,EP[12]-PriceScale*손절12,"b12"); ExitLong("bp12",Atlimit,EP[12]+PriceScale*익절12,"b12"); ExitLong("btr12",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR12,"b12"); } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-07-24 16:12:06

안녕하세요 예스스탁입니다. 수식의 첫진입이 기준+상승보다 아래인 상태에서 기준+상승이상의 시세가 발생하면 즉시 신호가 발생하는 타입입니다. 11월 1일에 종가가 263.18으로 끝나고 다음날인 11월 2일에 시초가가 266.08로 시작했습니다. 시초가가 해당 값 이상을 기록해서 발생한 신호 입니다. 진입이 항상 기준+상승에 정확히 신호가 발생하려면 봉이 시가가 기준+상승 이하이어야 합니다. 첫진입은 H < 기준+상승을 NextBarOpen <= 기준+상승으로 변경하시면 되고 추가진입들은 H < var1을 NextBarOpen <= var1 으로 변경해 주시면 됩니다. 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 데스크탑 cpu 8코어는 1분봉 사용시 2018년부터 시작해야 결과물 누락이 없고 노트북 cpu 4코어는 1분봉 사용시 2015년부터 시작해도 결과물이 잘 나옵니다. 데스크탑으로 이것 저것 해보니 3분봉에서 2015년부터의 결과물이 나옵니다. 그래서 아래 조건으로 시뮬레이션을 해보니 별첨처럼 잘못 진입하는 케이스를 발견했습니다. 진입가격은 264.00인데 2018년 11월 2일에 266.08에 진입하였습니다. 노트북 1분봉에서 같은 조건으로 시뮬레이션 해봐도 2018년 11월 2일에 266.08 진입이 발생합니다. 데스크탑 3분봉 기준 263.00 상승 1.00 (진입가격은 264.00) 피라미딩 설정 당일청산 오후2시45분 ******************************************************************************** input : 기준(263),상승(1.00); input : 손절1(50),익절1(300),TR1(150); input : 손절2(50),익절2(300),TR2(150); input : 손절3(50),익절3(300),TR3(150); input : 손절4(50),익절4(300),TR4(150); input : 손절5(50),익절5(300),TR5(150); input : 손절6(50),익절6(300),TR6(150); input : 손절7(50),익절7(300),TR7(150); input : 손절8(50),익절8(300),TR8(150); input : 손절9(50),익절9(300),TR9(150); input : 손절10(50),익절10(300),TR10(150); input : 손절11(50),익절11(300),TR11(150); input : 손절12(50),익절12(300),TR12(150); Array : EP[20](0); if MarketPosition == 0 and H < 기준+상승 and ExitDate(1) != sdate Then buy("b1",AtStop,기준+상승); if MarketPosition == 1 Then { var1 = (기준+상승) + 상승*MaxEntries; EP[MaxEntries] = LatestEntryPrice(0); if MaxEntries == 1 and H < var1 Then buy("b2",AtStop,var1); if MaxEntries == 2 and H < var1 Then buy("b3",AtStop,var1); if MaxEntries == 3 and H < var1 Then buy("b4",AtStop,var1); if MaxEntries == 4 and H < var1 Then buy("b5",AtStop,var1); if MaxEntries == 5 and H < var1 Then buy("b6",AtStop,var1); if MaxEntries == 6 and H < var1 Then buy("b7",AtStop,var1); if MaxEntries == 7 and H < var1 Then buy("b8",AtStop,var1); if MaxEntries == 8 and H < var1 Then buy("b9",AtStop,var1); if MaxEntries == 9 and H < var1 Then buy("b10",AtStop,var1); if MaxEntries == 10 and H < var1 Then buy("b11",AtStop,var1); if MaxEntries == 11 and H < var1 Then buy("b12",AtStop,var1); if MaxEntries >= 1 and EP[1] > 0 Then { ExitLong("bl1",AtStop,EP[1]-PriceScale*손절1,"b1"); ExitLong("bp1",Atlimit,EP[1]+PriceScale*익절1,"b1"); ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR1,"b1"); } if MaxEntries >= 2 and EP[2] > 0 Then { ExitLong("bl2",AtStop,EP[2]-PriceScale*손절2,"b2"); ExitLong("bp2",Atlimit,EP[2]+PriceScale*익절2,"b2"); ExitLong("btr2",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR2,"b2"); } if MaxEntries >= 3 and EP[3] > 0 Then { ExitLong("bl3",AtStop,EP[3]-PriceScale*손절3,"b3"); ExitLong("bp3",Atlimit,EP[3]+PriceScale*익절3,"b3"); ExitLong("btr3",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR3,"b3"); } if MaxEntries >= 4 and EP[4] > 0 Then { ExitLong("bl4",AtStop,EP[4]-PriceScale*손절4,"b4"); ExitLong("bp4",Atlimit,EP[4]+PriceScale*익절4,"b4"); ExitLong("btr4",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR4,"b4"); } if MaxEntries >= 5 and EP[5] > 0 Then { ExitLong("bl5",AtStop,EP[5]-PriceScale*손절5,"b5"); ExitLong("bp5",Atlimit,EP[5]+PriceScale*익절5,"b5"); ExitLong("btr5",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR5,"b5"); } if MaxEntries >= 6 and EP[6] > 0 Then { ExitLong("bl6",AtStop,EP[6]-PriceScale*손절6,"b6"); ExitLong("bp6",Atlimit,EP[6]+PriceScale*익절6,"b6"); ExitLong("btr6",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR6,"b6"); } if MaxEntries >= 7 and EP[7] > 0 Then { ExitLong("bl7",AtStop,EP[7]-PriceScale*손절7,"b7"); ExitLong("bp7",Atlimit,EP[7]+PriceScale*익절7,"b7"); ExitLong("btr7",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR7,"b7"); } if MaxEntries >= 8 and EP[8] > 0 Then { ExitLong("bl8",AtStop,EP[8]-PriceScale*손절8,"b8"); ExitLong("bp8",Atlimit,EP[8]+PriceScale*익절8,"b8"); ExitLong("btr8",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR8,"b8"); } if MaxEntries >= 9 and EP[9] > 0 Then { ExitLong("bl9",AtStop,EP[9]-PriceScale*손절9,"b9"); ExitLong("bp9",Atlimit,EP[9]+PriceScale*익절9,"b9"); ExitLong("btr9",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR9,"b9"); } if MaxEntries >= 10 and EP[10] > 0 Then { ExitLong("bl10",AtStop,EP[10]-PriceScale*손절10,"b10"); ExitLong("bp10",Atlimit,EP[10]+PriceScale*익절10,"b10"); ExitLong("btr10",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR10,"b10"); } if MaxEntries >= 11 and EP[11] > 0 Then { ExitLong("bl11",AtStop,EP[11]-PriceScale*손절11,"b11"); ExitLong("bp11",Atlimit,EP[11]+PriceScale*익절11,"b11"); ExitLong("btr11",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR11,"b11"); } if MaxEntries >= 12 and EP[12] > 0 Then { ExitLong("bl12",AtStop,EP[12]-PriceScale*손절12,"b12"); ExitLong("bp12",Atlimit,EP[12]+PriceScale*익절12,"b12"); ExitLong("btr12",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR12,"b12"); } }