커뮤니티

문의

프로필 이미지
목마와숙녀
2021-02-24 10:49:48
682
글번호 146577
답변완료

첨부 이미지

첨부파일은 아래 수식으로 시뮬레이션한 결과입니다. 3개까지 피라미딩 문제점 진입명 b1,b2,b3으로 exit를 주었는데 b1 매칭된 xb1 으로 b2,b3도 청산됩니다. 진입명에 따라 청산하게 변경바랍니다. b1 xb1 b2 xb2 b3 xb3 진입명 s1,s2,s3으로 exit를 주었는데 s1 매칭된 xs1 으로 s2,s3도 청산됩니다. 진입명에 따라 청산하게 변경바랍니다. s1 xs1 s2 xs2 s3 xs3 ************************************************************************************ input : 일(0.50),이(0.30),삼(0.30); input : 일x(0.30),이x(0.30),삼x(0.30); var : b1(0,Data2),b2(0,data3),gap1(0,Data2); b1 = Data2((C-CloseD(1))/CloseD(1)*100); b2 = Data3((C-CloseD(1))/CloseD(1)*100); gap1 = b1-b2; if MarketPosition == 0 and gap1 > 일 then buy("b1"); if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then buy("b2"); if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then buy("b3"); if MarketPosition == 1 and IsEntryName("b1") == true Then { if gap1 < 일x then ExitLong("xb1"); } if MarketPosition == 1 and IsEntryName("b2") == true Then { if gap1 < 이x then ExitLong("xb2"); } if MarketPosition == 1 and IsEntryName("b3") == true Then { if gap1 < 삼x then ExitLong("xb3"); } input : 사(0.20),오(0.60),육(0.60); input : 사x(0.10),오x(0.10),육x(0.10); var : d1(0,Data2),d2(0,data3),gap2(0,Data2); d1 = Data2((C-CloseD(1))/CloseD(1)*100); d2 = Data3((C-CloseD(1))/CloseD(1)*100); gap2 = d2-d1; if MarketPosition == 0 and gap2 > 사 then Sell("s1"); if MarketPosition == -1 and MaxEntries == 1 and gap2 > 오 then Sell("s2"); if MarketPosition == -1 and MaxEntries == 2 and gap2 > 육 then Sell("s3"); if MarketPosition == -1 and IsEntryName("s1") == true Then { if gap2 < 사x then ExitShort("xs1"); } if MarketPosition == -1 and IsEntryName("s2") == true Then { if gap2 < 오x then ExitShort("xs2"); } if MarketPosition == -1 and IsEntryName("s3") == true Then { if gap2 < 육x then ExitShort("xs3"); }
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2021-02-24 11:34:14

안녕하세요 예스스탁입니다. IsEntryName은 포지션의 첫진입명입니다. 피라미딩상태이면 추가진입한 이름은 IsEntryName로 인지가 되지 않습니다. 피라미딩상 각 진입이면 청산함수안에 진입명을 지정해야 합니다. 청산함수의 4번째가 진입명을 지정하는 매개변수입니다. input : 일(0.50),이(0.30),삼(0.30); input : 일x(0.30),이x(0.30),삼x(0.30); var : b1(0,Data2),b2(0,data3),gap1(0,Data2); b1 = Data2((C-CloseD(1))/CloseD(1)*100); b2 = Data3((C-CloseD(1))/CloseD(1)*100); gap1 = b1-b2; if MarketPosition == 0 and gap1 > 일 then buy("b1"); if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then buy("b2"); if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then buy("b3"); if MarketPosition == 1 Then { if gap1 < 일x then ExitLong("xb1",OnClose,DEf,"b1"); if gap1 < 이x then ExitLong("xb2",OnClose,DEf,"b2"); if gap1 < 삼x then ExitLong("xb3",OnClose,DEf,"b3"); } input : 사(0.20),오(0.60),육(0.60); input : 사x(0.10),오x(0.10),육x(0.10); var : d1(0,Data2),d2(0,data3),gap2(0,Data2); d1 = Data2((C-CloseD(1))/CloseD(1)*100); d2 = Data3((C-CloseD(1))/CloseD(1)*100); gap2 = d2-d1; if MarketPosition == 0 and gap2 > 사 then Sell("s1"); if MarketPosition == -1 and MaxEntries == 1 and gap2 > 오 then Sell("s2"); if MarketPosition == -1 and MaxEntries == 2 and gap2 > 육 then Sell("s3"); if MarketPosition == -1 Then { if gap2 < 사x then ExitShort("xs1",OnClose,DEf,"s1"); if gap2 < 오x then ExitShort("xs2",OnClose,DEf,"s2"); if gap2 < 육x then ExitShort("xs3",OnClose,DEf,"s3"); } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 첨부파일은 아래 수식으로 시뮬레이션한 결과입니다. 3개까지 피라미딩 문제점 진입명 b1,b2,b3으로 exit를 주었는데 b1 매칭된 xb1 으로 b2,b3도 청산됩니다. 진입명에 따라 청산하게 변경바랍니다. b1 xb1 b2 xb2 b3 xb3 진입명 s1,s2,s3으로 exit를 주었는데 s1 매칭된 xs1 으로 s2,s3도 청산됩니다. 진입명에 따라 청산하게 변경바랍니다. s1 xs1 s2 xs2 s3 xs3 ************************************************************************************ input : 일(0.50),이(0.30),삼(0.30); input : 일x(0.30),이x(0.30),삼x(0.30); var : b1(0,Data2),b2(0,data3),gap1(0,Data2); b1 = Data2((C-CloseD(1))/CloseD(1)*100); b2 = Data3((C-CloseD(1))/CloseD(1)*100); gap1 = b1-b2; if MarketPosition == 0 and gap1 > 일 then buy("b1"); if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then buy("b2"); if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then buy("b3"); if MarketPosition == 1 and IsEntryName("b1") == true Then { if gap1 < 일x then ExitLong("xb1"); } if MarketPosition == 1 and IsEntryName("b2") == true Then { if gap1 < 이x then ExitLong("xb2"); } if MarketPosition == 1 and IsEntryName("b3") == true Then { if gap1 < 삼x then ExitLong("xb3"); } input : 사(0.20),오(0.60),육(0.60); input : 사x(0.10),오x(0.10),육x(0.10); var : d1(0,Data2),d2(0,data3),gap2(0,Data2); d1 = Data2((C-CloseD(1))/CloseD(1)*100); d2 = Data3((C-CloseD(1))/CloseD(1)*100); gap2 = d2-d1; if MarketPosition == 0 and gap2 > 사 then Sell("s1"); if MarketPosition == -1 and MaxEntries == 1 and gap2 > 오 then Sell("s2"); if MarketPosition == -1 and MaxEntries == 2 and gap2 > 육 then Sell("s3"); if MarketPosition == -1 and IsEntryName("s1") == true Then { if gap2 < 사x then ExitShort("xs1"); } if MarketPosition == -1 and IsEntryName("s2") == true Then { if gap2 < 오x then ExitShort("xs2"); } if MarketPosition == -1 and IsEntryName("s3") == true Then { if gap2 < 육x then ExitShort("xs3"); }
프로필 이미지

목마와숙녀

2021-02-24 12:05:22

아래 피라미딩 수식에 사용할 수 있는 손절,익절,트레일링스탑 수식으로 변경바랍니다. if MarketPosition == 1 and IsEntryName("b1") == true Then { ExitLong("bl1",AtStop,EntryPrice-up손절1); Exitlong("bp1",AtLimit,EntryPrice+up익절1); Exitlong("btr1",AtStop,Highest(h,BarsSinceEntry)-upTR1); } if MarketPosition == 1 and IsEntryName("b2") == true then { ExitLong("bl2",AtStop,EntryPrice-up손절2); Exitlong("bp2",AtLimit,EntryPrice+up익절2); Exitlong("btr2",AtStop,highest(h,BarsSinceEntry)-upTR2); } if MarketPosition == 1 and IsEntryName("b3") == true then { ExitLong("bl3",AtStop,EntryPrice-up손절3); Exitlong("bp3",AtLimit,EntryPrice+up익절3); Exitlong("btr3",AtStop,highest(h,BarsSinceEntry)-upTR3); } if MarketPosition == -1 and IsEntryName("s1") == true Then { ExitShort("sl1",AtStop,EntryPrice+dn손절1); ExitShort("sp1",AtLimit,EntryPrice-dn익절1); ExitShort("str1",AtStop,Lowest(l,BarsSinceEntry)+dnTR1); } if MarketPosition == -1 and IsEntryName("s2") == true Then { ExitShort("sl2",AtStop,EntryPrice+dn손절2); ExitShort("sp2",AtLimit,EntryPrice-dn익절2); ExitShort("str2",AtStop,Lowest(l,BarsSinceEntry)+dnTR2); } if MarketPosition == -1 and IsEntryName("s3") == true Then { ExitShort("sl3",AtStop,EntryPrice+dn손절3); ExitShort("sp3",AtLimit,EntryPrice-dn익절3); ExitShort("str3",AtStop,Lowest(l,BarsSinceEntry)+dnTR3); } > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의 > 안녕하세요 예스스탁입니다. IsEntryName은 포지션의 첫진입명입니다. 피라미딩상태이면 추가진입한 이름은 IsEntryName로 인지가 되지 않습니다. 피라미딩상 각 진입이면 청산함수안에 진입명을 지정해야 합니다. 청산함수의 4번째가 진입명을 지정하는 매개변수입니다. input : 일(0.50),이(0.30),삼(0.30); input : 일x(0.30),이x(0.30),삼x(0.30); var : b1(0,Data2),b2(0,data3),gap1(0,Data2); b1 = Data2((C-CloseD(1))/CloseD(1)*100); b2 = Data3((C-CloseD(1))/CloseD(1)*100); gap1 = b1-b2; if MarketPosition == 0 and gap1 > 일 then buy("b1"); if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then buy("b2"); if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then buy("b3"); if MarketPosition == 1 Then { if gap1 < 일x then ExitLong("xb1",OnClose,DEf,"b1"); if gap1 < 이x then ExitLong("xb2",OnClose,DEf,"b2"); if gap1 < 삼x then ExitLong("xb3",OnClose,DEf,"b3"); } input : 사(0.20),오(0.60),육(0.60); input : 사x(0.10),오x(0.10),육x(0.10); var : d1(0,Data2),d2(0,data3),gap2(0,Data2); d1 = Data2((C-CloseD(1))/CloseD(1)*100); d2 = Data3((C-CloseD(1))/CloseD(1)*100); gap2 = d2-d1; if MarketPosition == 0 and gap2 > 사 then Sell("s1"); if MarketPosition == -1 and MaxEntries == 1 and gap2 > 오 then Sell("s2"); if MarketPosition == -1 and MaxEntries == 2 and gap2 > 육 then Sell("s3"); if MarketPosition == -1 Then { if gap2 < 사x then ExitShort("xs1",OnClose,DEf,"s1"); if gap2 < 오x then ExitShort("xs2",OnClose,DEf,"s2"); if gap2 < 육x then ExitShort("xs3",OnClose,DEf,"s3"); } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 첨부파일은 아래 수식으로 시뮬레이션한 결과입니다. 3개까지 피라미딩 문제점 진입명 b1,b2,b3으로 exit를 주었는데 b1 매칭된 xb1 으로 b2,b3도 청산됩니다. 진입명에 따라 청산하게 변경바랍니다. b1 xb1 b2 xb2 b3 xb3 진입명 s1,s2,s3으로 exit를 주었는데 s1 매칭된 xs1 으로 s2,s3도 청산됩니다. 진입명에 따라 청산하게 변경바랍니다. s1 xs1 s2 xs2 s3 xs3 ************************************************************************************ input : 일(0.50),이(0.30),삼(0.30); input : 일x(0.30),이x(0.30),삼x(0.30); var : b1(0,Data2),b2(0,data3),gap1(0,Data2); b1 = Data2((C-CloseD(1))/CloseD(1)*100); b2 = Data3((C-CloseD(1))/CloseD(1)*100); gap1 = b1-b2; if MarketPosition == 0 and gap1 > 일 then buy("b1"); if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then buy("b2"); if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then buy("b3"); if MarketPosition == 1 and IsEntryName("b1") == true Then { if gap1 < 일x then ExitLong("xb1"); } if MarketPosition == 1 and IsEntryName("b2") == true Then { if gap1 < 이x then ExitLong("xb2"); } if MarketPosition == 1 and IsEntryName("b3") == true Then { if gap1 < 삼x then ExitLong("xb3"); } input : 사(0.20),오(0.60),육(0.60); input : 사x(0.10),오x(0.10),육x(0.10); var : d1(0,Data2),d2(0,data3),gap2(0,Data2); d1 = Data2((C-CloseD(1))/CloseD(1)*100); d2 = Data3((C-CloseD(1))/CloseD(1)*100); gap2 = d2-d1; if MarketPosition == 0 and gap2 > 사 then Sell("s1"); if MarketPosition == -1 and MaxEntries == 1 and gap2 > 오 then Sell("s2"); if MarketPosition == -1 and MaxEntries == 2 and gap2 > 육 then Sell("s3"); if MarketPosition == -1 and IsEntryName("s1") == true Then { if gap2 < 사x then ExitShort("xs1"); } if MarketPosition == -1 and IsEntryName("s2") == true Then { if gap2 < 오x then ExitShort("xs2"); } if MarketPosition == -1 and IsEntryName("s3") == true Then { if gap2 < 육x then ExitShort("xs3"); }
프로필 이미지

예스스탁 예스스탁 답변

2021-02-24 14:04:55

안녕하세요 예스스탁입니다. var : BP1(0),BP2(0),BP3(0); var : BH1(0),BH2(0),BH3(0); var : SP1(0),SP2(0),SP3(0); var : SL1(0),SL2(0),SL3(0); if MarketPosition == 1 Then { if MarketPosition != MarketPosition[1] or CurrentContracts > CurrentContracts[1] Then { if LatestEntryName(0) == "b1" Then { BP1 = LatestEntryPrice(0); BH1 = H; } if LatestEntryName(0) == "b2" Then { BP2 = LatestEntryPrice(0); BH2 = H; } if LatestEntryName(0) == "b3" Then { BP3 = LatestEntryPrice(0); BH3 = H; } } if BH1 > 0 and H > BH1 Then BH1 = H; if BH2 > 0 and H > BH2 Then BH2 = H; if BH3 > 0 and H > BH3 Then BH3 = H; if BP1 > 0 Then { ExitLong("bl1",AtStop,BP1-up손절1,"b1"); Exitlong("bp1",AtLimit,BP1+up익절1,"b1"); Exitlong("btr1",AtStop,BH1-upTR1,"b1"); } if BP2 > 0 Then { ExitLong("bl2",AtStop,BP2-up손절2,"b2"); Exitlong("bp2",AtLimit,BP2+up익절2,"b2"); Exitlong("btr2",AtStop,BH2-upTR2,"b2"); } if BP3 > 0 Then { ExitLong("bl3",AtStop,BP3-up손절3,"b3"); Exitlong("bp3",AtLimit,BP3+up익절3,"b3"); Exitlong("btr3",AtStop,BH3-upTR3,"b3"); } } Else { BP1 = 0; BP2 = 0; BP3 = 0; BH1 = 0; BH2 = 0; BH3 = 0; } if MarketPosition == -1 Then { if MarketPosition != MarketPosition[1] or CurrentContracts > CurrentContracts[1] Then { if LatestEntryName(0) == "s1" Then { SP1 = LatestEntryPrice(0); SL1 = H; } if LatestEntryName(0) == "s2" Then { SP2 = LatestEntryPrice(0); SL2 = H; } if LatestEntryName(0) == "s3" Then { SP3 = LatestEntryPrice(0); Sl3 = H; } } if SL1 > 0 and L < SL1 Then SL1 = L; if SL2 > 0 and L < SL2 Then SL2 = L; if SL3 > 0 and L < SL3 Then SL3 = L; if SP1 > 0 Then { ExitShort("sl1",AtStop,SP1+dn손절1,"s1"); ExitShort("sp1",AtLimit,SP1-dn익절1,"s1"); ExitShort("str1",AtStop,SL1+dnTR1,"s1"); } if SP2 > 0 Then { ExitShort("sl2",AtStop,SP2+dn손절2,"s2"); ExitShort("sp2",AtLimit,SP2-dn익절2,"s2"); ExitShort("str2",AtStop,SL2+dnTR2,"s2"); } if SP3 > 0 Then { ExitShort("sl3",AtStop,SP3+dn손절3,"s3"); ExitShort("sp3",AtLimit,SP3-dn익절3,"s3"); ExitShort("str3",AtStop,SL3+dnTR3,"s3"); } } Else { SP1 = 0; SP2 = 0; SP3 = 0; SL1 = 0; SL2 = 0; SL3 = 0; } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : Re : Re : 문의 > 아래 피라미딩 수식에 사용할 수 있는 손절,익절,트레일링스탑 수식으로 변경바랍니다. if MarketPosition == 1 and IsEntryName("b1") == true Then { ExitLong("bl1",AtStop,EntryPrice-up손절1); Exitlong("bp1",AtLimit,EntryPrice+up익절1); Exitlong("btr1",AtStop,Highest(h,BarsSinceEntry)-upTR1); } if MarketPosition == 1 and IsEntryName("b2") == true then { ExitLong("bl2",AtStop,EntryPrice-up손절2); Exitlong("bp2",AtLimit,EntryPrice+up익절2); Exitlong("btr2",AtStop,highest(h,BarsSinceEntry)-upTR2); } if MarketPosition == 1 and IsEntryName("b3") == true then { ExitLong("bl3",AtStop,EntryPrice-up손절3); Exitlong("bp3",AtLimit,EntryPrice+up익절3); Exitlong("btr3",AtStop,highest(h,BarsSinceEntry)-upTR3); } if MarketPosition == -1 and IsEntryName("s1") == true Then { ExitShort("sl1",AtStop,EntryPrice+dn손절1); ExitShort("sp1",AtLimit,EntryPrice-dn익절1); ExitShort("str1",AtStop,Lowest(l,BarsSinceEntry)+dnTR1); } if MarketPosition == -1 and IsEntryName("s2") == true Then { ExitShort("sl2",AtStop,EntryPrice+dn손절2); ExitShort("sp2",AtLimit,EntryPrice-dn익절2); ExitShort("str2",AtStop,Lowest(l,BarsSinceEntry)+dnTR2); } if MarketPosition == -1 and IsEntryName("s3") == true Then { ExitShort("sl3",AtStop,EntryPrice+dn손절3); ExitShort("sp3",AtLimit,EntryPrice-dn익절3); ExitShort("str3",AtStop,Lowest(l,BarsSinceEntry)+dnTR3); } > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의 > 안녕하세요 예스스탁입니다. IsEntryName은 포지션의 첫진입명입니다. 피라미딩상태이면 추가진입한 이름은 IsEntryName로 인지가 되지 않습니다. 피라미딩상 각 진입이면 청산함수안에 진입명을 지정해야 합니다. 청산함수의 4번째가 진입명을 지정하는 매개변수입니다. input : 일(0.50),이(0.30),삼(0.30); input : 일x(0.30),이x(0.30),삼x(0.30); var : b1(0,Data2),b2(0,data3),gap1(0,Data2); b1 = Data2((C-CloseD(1))/CloseD(1)*100); b2 = Data3((C-CloseD(1))/CloseD(1)*100); gap1 = b1-b2; if MarketPosition == 0 and gap1 > 일 then buy("b1"); if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then buy("b2"); if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then buy("b3"); if MarketPosition == 1 Then { if gap1 < 일x then ExitLong("xb1",OnClose,DEf,"b1"); if gap1 < 이x then ExitLong("xb2",OnClose,DEf,"b2"); if gap1 < 삼x then ExitLong("xb3",OnClose,DEf,"b3"); } input : 사(0.20),오(0.60),육(0.60); input : 사x(0.10),오x(0.10),육x(0.10); var : d1(0,Data2),d2(0,data3),gap2(0,Data2); d1 = Data2((C-CloseD(1))/CloseD(1)*100); d2 = Data3((C-CloseD(1))/CloseD(1)*100); gap2 = d2-d1; if MarketPosition == 0 and gap2 > 사 then Sell("s1"); if MarketPosition == -1 and MaxEntries == 1 and gap2 > 오 then Sell("s2"); if MarketPosition == -1 and MaxEntries == 2 and gap2 > 육 then Sell("s3"); if MarketPosition == -1 Then { if gap2 < 사x then ExitShort("xs1",OnClose,DEf,"s1"); if gap2 < 오x then ExitShort("xs2",OnClose,DEf,"s2"); if gap2 < 육x then ExitShort("xs3",OnClose,DEf,"s3"); } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 첨부파일은 아래 수식으로 시뮬레이션한 결과입니다. 3개까지 피라미딩 문제점 진입명 b1,b2,b3으로 exit를 주었는데 b1 매칭된 xb1 으로 b2,b3도 청산됩니다. 진입명에 따라 청산하게 변경바랍니다. b1 xb1 b2 xb2 b3 xb3 진입명 s1,s2,s3으로 exit를 주었는데 s1 매칭된 xs1 으로 s2,s3도 청산됩니다. 진입명에 따라 청산하게 변경바랍니다. s1 xs1 s2 xs2 s3 xs3 ************************************************************************************ input : 일(0.50),이(0.30),삼(0.30); input : 일x(0.30),이x(0.30),삼x(0.30); var : b1(0,Data2),b2(0,data3),gap1(0,Data2); b1 = Data2((C-CloseD(1))/CloseD(1)*100); b2 = Data3((C-CloseD(1))/CloseD(1)*100); gap1 = b1-b2; if MarketPosition == 0 and gap1 > 일 then buy("b1"); if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then buy("b2"); if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then buy("b3"); if MarketPosition == 1 and IsEntryName("b1") == true Then { if gap1 < 일x then ExitLong("xb1"); } if MarketPosition == 1 and IsEntryName("b2") == true Then { if gap1 < 이x then ExitLong("xb2"); } if MarketPosition == 1 and IsEntryName("b3") == true Then { if gap1 < 삼x then ExitLong("xb3"); } input : 사(0.20),오(0.60),육(0.60); input : 사x(0.10),오x(0.10),육x(0.10); var : d1(0,Data2),d2(0,data3),gap2(0,Data2); d1 = Data2((C-CloseD(1))/CloseD(1)*100); d2 = Data3((C-CloseD(1))/CloseD(1)*100); gap2 = d2-d1; if MarketPosition == 0 and gap2 > 사 then Sell("s1"); if MarketPosition == -1 and MaxEntries == 1 and gap2 > 오 then Sell("s2"); if MarketPosition == -1 and MaxEntries == 2 and gap2 > 육 then Sell("s3"); if MarketPosition == -1 and IsEntryName("s1") == true Then { if gap2 < 사x then ExitShort("xs1"); } if MarketPosition == -1 and IsEntryName("s2") == true Then { if gap2 < 오x then ExitShort("xs2"); } if MarketPosition == -1 and IsEntryName("s3") == true Then { if gap2 < 육x then ExitShort("xs3"); }