커뮤니티

시스템 수정 문의드립니다,

프로필 이미지
종호
2020-03-20 12:55:13
487
글번호 137054
답변완료
아래수식을 수정 부탁드립니다. 해외선물을 매매하는데요. 연속손실이 6회이상되면 그날 매매가 안되도록 부탁드립니다. 예를들어 저녁9시에 매매가 멈추었다면 익일 새벽까지 매매가 안되다가 익일 새로운 날로 매매가 될 때 매매가 되도록 부탁드립니다. var : HL(0),HH(0),Hi(0),BuyEntry(false),Bcount(0),BH(0); var : LH(0),LL(0),Li(0),SellEntry(false),Scount(0),SL(0); INPUT: 생략 Input:진폭BUY(20),진폭SELL(20); var : H0(0), L0(0), B0(0), B1(0), M1(0), H2(0), L2(0), B2(0), M2(0),M0(0),H1(0), L1(0); input:aaa(9),bbb(5),sss(9),ttt(5); H1 = highest(H,aaa); L1 = Lowest(L,bbb); B1 = H1-L1; M1 = (H1+L1)/2; H0 = highest(H, sss); L0 = Lowest(L, ttt); B0 = H0-L0; M0 = (H0+L0)/2; if MarketPosition == 0 and C >= O+PriceScale*A and C[1] >= O[1]+PriceScale*B and C[2] <= O[2]-PriceScale*CC Then { HL = Lowest(L,3); HH = highest(H,3); Hi = index; BuyEntry = true; Bcount = 0; } if index > Hi and Hi > 0 Then { if H > HH Then HH = H; if L <= HL+(HH-HL)*지지1 Then buyEntry = false; if BuyEntry == true and C > O Then { Bcount = Bcount+1; if bcount == 2 AND (HH-HL)>진폭BUY * PriceScale Then buy("b"); } } if MarketPosition == 0 and C <= O-PriceScale*D and C[1] <= O[1]-PriceScale*E and C[2] >= O[2]+PriceScale*F Then { LH = highest(H,3); LL = Lowest(L,3); Li = index; SellEntry = true; Scount = 0; } if index > Li and Li > 0 Then { if L < LL Then LL = L; if H >= LL+(LH-LL)*지지2 Then SellEntry = False; if SellEntry == true and C < O Then { Scount = Scount+1; if Scount == 2 AND (LH-LL)>진폭SELL * PriceScale Then sell("s"); } } if MarketPosition == 1 then { Hi = 0; BH = highest(H,BarsSinceEntry); if BH >= EntryPrice+PriceScale*F1 Then { //ExitLong("bx",AtStop,BH-(BH-EntryPrice)*facter1); } } if MarketPosition == -1 then { LI = 0; SL = lowest(L,BarsSinceEntry); if SL <= EntryPrice-PriceScale*F2 Then { // ExitShort("sx",AtStop,SL+(EntryPrice-SL)*facter2); } } SetStopProfittarget(PriceScale*이익변수,PointStop); SetStopLoss(PriceScale*손절변수,PointStop); //SetStopLoss(PriceScale*bb,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-03-23 10:16:53

안녕하세요 예스스탁입니다. var : HL(0),HH(0),Hi(0),BuyEntry(false),Bcount(0),BH(0); var : LH(0),LL(0),Li(0),SellEntry(false),Scount(0),SL(0); INPUT: 생략(0); Input:진폭BUY(20),진폭SELL(20); var : H0(0), L0(0), B0(0), B1(0), M1(0), H2(0), L2(0), B2(0), M2(0),M0(0),H1(0), L1(0); input:aaa(9),bbb(5),sss(9),ttt(5),연속손실횟수(6); var : 연속손실(0); if bdate != bdate[1] Then 연속손실 = 0; if TotalTrades > TotalTrades[1] Then { if PositionProfit(1) < 0 then 연속손실 = 연속손실+1; Else 연속손실 = 0; } H1 = highest(H,aaa); L1 = Lowest(L,bbb); B1 = H1-L1; M1 = (H1+L1)/2; H0 = highest(H, sss); L0 = Lowest(L, ttt); B0 = H0-L0; M0 = (H0+L0)/2; if MarketPosition == 0 and C >= O+PriceScale*A and C[1] >= O[1]+PriceScale*B and C[2] <= O[2]-PriceScale*CC Then { HL = Lowest(L,3); HH = highest(H,3); Hi = index; BuyEntry = true; Bcount = 0; } if index > Hi and Hi > 0 Then { if H > HH Then HH = H; if L <= HL+(HH-HL)*지지1 Then buyEntry = false; if BuyEntry == true and C > O Then { Bcount = Bcount+1; if bcount == 2 AND (HH-HL)>진폭BUY * PriceScale and 연속손실 < 연속손실횟수 Then buy("b"); } } if MarketPosition == 0 and C <= O-PriceScale*D and C[1] <= O[1]-PriceScale*E and C[2] >= O[2]+PriceScale*F Then { LH = highest(H,3); LL = Lowest(L,3); Li = index; SellEntry = true; Scount = 0; } if index > Li and Li > 0 Then { if L < LL Then LL = L; if H >= LL+(LH-LL)*지지2 Then SellEntry = False; if SellEntry == true and C < O Then { Scount = Scount+1; if Scount == 2 AND (LH-LL)>진폭SELL * PriceScale and 연속손실 < 연속손실횟수 Then sell("s"); } } if MarketPosition == 1 then { Hi = 0; BH = highest(H,BarsSinceEntry); if BH >= EntryPrice+PriceScale*F1 Then { //ExitLong("bx",AtStop,BH-(BH-EntryPrice)*facter1); } } if MarketPosition == -1 then { LI = 0; SL = lowest(L,BarsSinceEntry); if SL <= EntryPrice-PriceScale*F2 Then { // ExitShort("sx",AtStop,SL+(EntryPrice-SL)*facter2); } } SetStopProfittarget(PriceScale*이익변수,PointStop); SetStopLoss(PriceScale*손절변수,PointStop); //SetStopLoss(PriceScale*bb,PointStop); 즐거운 하루되세요 > 종호 님이 쓴 글입니다. > 제목 : 시스템 수정 문의드립니다, > 아래수식을 수정 부탁드립니다. 해외선물을 매매하는데요. 연속손실이 6회이상되면 그날 매매가 안되도록 부탁드립니다. 예를들어 저녁9시에 매매가 멈추었다면 익일 새벽까지 매매가 안되다가 익일 새로운 날로 매매가 될 때 매매가 되도록 부탁드립니다. var : HL(0),HH(0),Hi(0),BuyEntry(false),Bcount(0),BH(0); var : LH(0),LL(0),Li(0),SellEntry(false),Scount(0),SL(0); INPUT: 생략 Input:진폭BUY(20),진폭SELL(20); var : H0(0), L0(0), B0(0), B1(0), M1(0), H2(0), L2(0), B2(0), M2(0),M0(0),H1(0), L1(0); input:aaa(9),bbb(5),sss(9),ttt(5); H1 = highest(H,aaa); L1 = Lowest(L,bbb); B1 = H1-L1; M1 = (H1+L1)/2; H0 = highest(H, sss); L0 = Lowest(L, ttt); B0 = H0-L0; M0 = (H0+L0)/2; if MarketPosition == 0 and C >= O+PriceScale*A and C[1] >= O[1]+PriceScale*B and C[2] <= O[2]-PriceScale*CC Then { HL = Lowest(L,3); HH = highest(H,3); Hi = index; BuyEntry = true; Bcount = 0; } if index > Hi and Hi > 0 Then { if H > HH Then HH = H; if L <= HL+(HH-HL)*지지1 Then buyEntry = false; if BuyEntry == true and C > O Then { Bcount = Bcount+1; if bcount == 2 AND (HH-HL)>진폭BUY * PriceScale Then buy("b"); } } if MarketPosition == 0 and C <= O-PriceScale*D and C[1] <= O[1]-PriceScale*E and C[2] >= O[2]+PriceScale*F Then { LH = highest(H,3); LL = Lowest(L,3); Li = index; SellEntry = true; Scount = 0; } if index > Li and Li > 0 Then { if L < LL Then LL = L; if H >= LL+(LH-LL)*지지2 Then SellEntry = False; if SellEntry == true and C < O Then { Scount = Scount+1; if Scount == 2 AND (LH-LL)>진폭SELL * PriceScale Then sell("s"); } } if MarketPosition == 1 then { Hi = 0; BH = highest(H,BarsSinceEntry); if BH >= EntryPrice+PriceScale*F1 Then { //ExitLong("bx",AtStop,BH-(BH-EntryPrice)*facter1); } } if MarketPosition == -1 then { LI = 0; SL = lowest(L,BarsSinceEntry); if SL <= EntryPrice-PriceScale*F2 Then { // ExitShort("sx",AtStop,SL+(EntryPrice-SL)*facter2); } } SetStopProfittarget(PriceScale*이익변수,PointStop); SetStopLoss(PriceScale*손절변수,PointStop); //SetStopLoss(PriceScale*bb,PointStop);