커뮤니티

문의

프로필 이미지
목마와숙녀
2025-07-11 13:16:46
168
글번호 192448
답변완료
아래 수식은 국내 데이트레이딩 하루 2회 거래하는 수식입니다. 첫번째 진입(b1)에서 익절로 포지션을 청산했을 경우 거래를 중지하는 수식을 추가해주십시요. b1 익절 이후 b2 진입은 성공율이 낮기 때문입니다. 항상 고맙습니다. ************************************************************************************** Input : 최대(99999),최소(0),거래횟수(2); input : lock1(103000),b1(9),진입눌림1(4),진입돌파1(2); input : lock2(113000),b2(18),진입눌림2(3),진입돌파2(1); input : als(50),atr1(0),atr2(32),agl(128); input : bls(38),btr1(0),btr2(90),bgl(108); var : T1(0,data1),entry(0,data1); var : LL(0,data2),EH(0,data2),E1(0,data2),H1(0,data2); var : i1(0,data2),S1(0,data2),L1(0,data2); var : DH2(0,data2),DL2(0,data2); if data1(Bdate != Bdate[1]) Then T1 = TotalTrades; if data2(Bdate != Bdate[1]) Then{ E1 = 0; DH2 = data2(H); DL2 = data2(L); } if data2(H > DH2) Then DH2 = data2(H); if data2(L < DL2) Then DL2 = data2(L); if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if data2(E1 == 0 and C >= DL2+PriceScale*B1) Then{ E1 = 1; H1 = data2(H); i1 = data2(index); } if data2(E1 == 1 and index > i1) then{ if data2(H > H1) Then H1 = data2(H); if data2(L <= H1-PriceScale*진입눌림1) Then{ E1 = 2; i1 = data2(index); S1 = H1; } } if stime<lock1 and 최대 >= C and C >= 최소 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파1) Then{ buy("b1"); } } if TotalTrades > TotalTrades[1] Then LL = data2(L); if data2(L < LL) Then LL = data2(L); if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if data2(E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2) Then{ E1 = 1; H1 = data2(H); i1 = data2(index); } if data2(E1 == 1 and index > i1) then{ if data2(H > H1) Then H1 = data2(H); if data2(L <= H1-PriceScale*진입눌림2) Then{ E1 = 2; i1 = data2(index); S1 = H1; } } if stime<lock2 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파2) Then{ buy("b2"); } } if MarketPosition== 1 Then { if IsEntryName("b1") == true Then { SetStopLoss(PriceScale*als,PointStop); SetStopTrailing(PriceScale*atr2,PriceScale*atr1,PointStop,1); SetStopProfittarget(PriceScale*agl,PointStop); } Else if IsEntryName("b2") == true Then { SetStopLoss(PriceScale*bls,PointStop); SetStopTrailing(PriceScale*btr2,PriceScale*btr1,PointStop,1); SetStopProfittarget(PriceScale*bgl,PointStop); } Else { SetStopLoss(0); SetStopTrailing(0,0); SetStopProfittarget(0); } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-07-11 13:27:47

안녕하세요 예스스탁입니다. Input : 최대(99999),최소(0),거래횟수(2); input : lock1(103000),b1(9),진입눌림1(4),진입돌파1(2); input : lock2(113000),b2(18),진입눌림2(3),진입돌파2(1); input : als(50),atr1(0),atr2(32),agl(128); input : bls(38),btr1(0),btr2(90),bgl(108); var : T1(0,data1),entry(0,data1); var : LL(0,data2),EH(0,data2),E1(0,data2),H1(0,data2); var : i1(0,data2),S1(0,data2),L1(0,data2); var : DH2(0,data2),DL2(0,data2); var : Trade(true,Data1); if data1(Bdate != Bdate[1]) Then { T1 = TotalTrades; E1 = 0; DH2 = data2(H); DL2 = data2(L); Trade = true; } if data2(H > DH2) Then DH2 = data2(H); if data2(L < DL2) Then DL2 = data2(L); if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if TotalTrades > TotalTrades[1] and IsEntryName("b1",1) == true and IsExitName("topProfitTarget",1) == true Then Trade = False; if MarketPosition == 0 and entry == 0 Then { if data2(E1 == 0 and C >= DL2+PriceScale*B1) Then { E1 = 1; H1 = data2(H); i1 = data2(index); } if data2(E1 == 1 and index > i1) then { if data2(H > H1) Then H1 = data2(H); if data2(L <= H1-PriceScale*진입눌림1) Then { E1 = 2; i1 = data2(index); S1 = H1; } } if stime<lock1 and 최대 >= C and C >= 최소 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파1) and Trade == true Then { buy("b1"); } } if TotalTrades > TotalTrades[1] Then LL = data2(L); if data2(L < LL) Then LL = data2(L); if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then { if data2(E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2) Then { E1 = 1; H1 = data2(H); i1 = data2(index); } if data2(E1 == 1 and index > i1) then { if data2(H > H1) Then H1 = data2(H); if data2(L <= H1-PriceScale*진입눌림2) Then { E1 = 2; i1 = data2(index); S1 = H1; } } if stime<lock2 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파2) and Trade == true Then { buy("b2"); } } if MarketPosition== 1 Then { if IsEntryName("b1") == true Then { SetStopLoss(PriceScale*als,PointStop); SetStopTrailing(PriceScale*atr2,PriceScale*atr1,PointStop,1); SetStopProfittarget(PriceScale*agl,PointStop); } Else if IsEntryName("b2") == true Then { SetStopLoss(PriceScale*bls,PointStop); SetStopTrailing(PriceScale*btr2,PriceScale*btr1,PointStop,1); SetStopProfittarget(PriceScale*bgl,PointStop); } Else { SetStopLoss(0); SetStopTrailing(0,0); SetStopProfittarget(0); } } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 아래 수식은 국내 데이트레이딩 하루 2회 거래하는 수식입니다. 첫번째 진입(b1)에서 익절로 포지션을 청산했을 경우 거래를 중지하는 수식을 추가해주십시요. b1 익절 이후 b2 진입은 성공율이 낮기 때문입니다. 항상 고맙습니다. ************************************************************************************** Input : 최대(99999),최소(0),거래횟수(2); input : lock1(103000),b1(9),진입눌림1(4),진입돌파1(2); input : lock2(113000),b2(18),진입눌림2(3),진입돌파2(1); input : als(50),atr1(0),atr2(32),agl(128); input : bls(38),btr1(0),btr2(90),bgl(108); var : T1(0,data1),entry(0,data1); var : LL(0,data2),EH(0,data2),E1(0,data2),H1(0,data2); var : i1(0,data2),S1(0,data2),L1(0,data2); var : DH2(0,data2),DL2(0,data2); if data1(Bdate != Bdate[1]) Then T1 = TotalTrades; if data2(Bdate != Bdate[1]) Then{ E1 = 0; DH2 = data2(H); DL2 = data2(L); } if data2(H > DH2) Then DH2 = data2(H); if data2(L < DL2) Then DL2 = data2(L); if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if data2(E1 == 0 and C >= DL2+PriceScale*B1) Then{ E1 = 1; H1 = data2(H); i1 = data2(index); } if data2(E1 == 1 and index > i1) then{ if data2(H > H1) Then H1 = data2(H); if data2(L <= H1-PriceScale*진입눌림1) Then{ E1 = 2; i1 = data2(index); S1 = H1; } } if stime<lock1 and 최대 >= C and C >= 최소 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파1) Then{ buy("b1"); } } if TotalTrades > TotalTrades[1] Then LL = data2(L); if data2(L < LL) Then LL = data2(L); if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if data2(E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2) Then{ E1 = 1; H1 = data2(H); i1 = data2(index); } if data2(E1 == 1 and index > i1) then{ if data2(H > H1) Then H1 = data2(H); if data2(L <= H1-PriceScale*진입눌림2) Then{ E1 = 2; i1 = data2(index); S1 = H1; } } if stime<lock2 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파2) Then{ buy("b2"); } } if MarketPosition== 1 Then { if IsEntryName("b1") == true Then { SetStopLoss(PriceScale*als,PointStop); SetStopTrailing(PriceScale*atr2,PriceScale*atr1,PointStop,1); SetStopProfittarget(PriceScale*agl,PointStop); } Else if IsEntryName("b2") == true Then { SetStopLoss(PriceScale*bls,PointStop); SetStopTrailing(PriceScale*btr2,PriceScale*btr1,PointStop,1); SetStopProfittarget(PriceScale*bgl,PointStop); } Else { SetStopLoss(0); SetStopTrailing(0,0); SetStopProfittarget(0); } }