커뮤니티

요청

프로필 이미지
목마와숙녀
2020-09-13 19:29:38
683
글번호 142290
답변완료
1) 수식 부탁드립니다. 데이트레이딩 당일 발생봉으로 계산 보조data2 당일 저점에서 2000개 상승하면 buy 보조data2 당일 고점에서 2000개 하락하면 sell 2) 익절 수식 부탁드립니다. buy 경우 최소수익 2.50 달성 후 1.25 추가 상승시 exitlong 총 3.75 수익 sell 경우 최소수익 2.50 달성 후 1.25 추가 하락시 exitshort 총 3.75 수익 3) data2 보조차트에 사용할 청산수식으로 수정해 주십시요 if MarketPosition == 1 and IsEntryName("b1") == true Then { SetStopLoss(upLOSS,PointStop); SetStopProfittarget(uplimit,PointStop); SetStopTrailing(upTRAIL,up최소수익,PointStop); SetStopInactivity(up최소가격변화포인트,up봉갯수,PointStop); } if MarketPosition == 1 and IsEntryName("b1") == true Then { ExitLong("bl1",AtStop,EntryPrice-PriceScale*up손절); ExitLong("bp1",Atlimit,EntryPrice+PriceScale*up익절); ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*upTR); } if MarketPosition == -1 and IsEntryName("s1") == true Then { SetStopLoss(dnLOSS,PointStop); SetStopProfittarget(dnLimit,PointStop); SetStopTrailing(dnTRAIL,dn최소수익,PointStop); SetStopInactivity(dn최소가격변화포인트,dn봉갯수,PointStop); } if MarketPosition == -1 and IsEntryName("s1") == true Then { ExitShort("sl1",AtStop,EntryPrice+pricescale*dn손절); ExitShort("sp1",AtLimit,EntryPrice-pricescale*dn익절); ExitShort("str1",AtStop,Lowest(l,BarsSinceEntry)+pricescale*dnTR); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-09-14 09:40:58

안녕하세요 예스스탁입니다. 1 var : hh(0,Data2),ll(0,Data2); if Data2(Bdate != Bdate[1]) Then { hh = Data2(c); LL = Data2(c); } Else { if Data2(c) > hh Then { hh = Data2(c); } if Data2(c) < ll Then { ll = Data2(c); } if Data2(CrossUp(c,ll+2000)) Then Buy(); if Data2(CrossDown(c,hh-2000)) Then Sell(); } 2 문의하신 내용은 3.75수익이면 청산하는 내용과 같습니다. SetStopProfittarget(3.75,PointStop); 3 var : C2(0,Data1),H2(0,Data1),L2(0,Data1); var : Bi(0,Data2),Si(0,Data2); H2 = Data2(h); L2 = Data2(L); C2 = Data2(C); if MarketPosition == 1 and IsEntryName("b1") == true Then { Bi = Bi+1; if L2 <= C2[BarsSinceEntry]-upLOSS Then ExitLong(); if H2 >= C2[BarsSinceEntry]+uplimit Then ExitLong(); if Highest(H2,BarsSinceEntry) >= C2[BarsSinceEntry]+up최소수익 and L2 <= Highest(H2,BarsSinceEntry)-upTRAIL Then ExitLong(); if Bi == up봉갯수 and Highest(H2,BarsSinceEntry) < C2[BarsSinceEntry]+up최소가격변화포인트 Then ExitLong(); } Else Bi = 0; if MarketPosition == 1 and IsEntryName("b1") == true Then { ExitLong("bl1",AtStop,EntryPrice-PriceScale*up손절); ExitLong("bp1",Atlimit,EntryPrice+PriceScale*up익절); ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*upTR); if L2 <= C2[BarsSinceEntry]-Data2(PriceScale*up손절) Then ExitLong"bl1",(); if H2 >= C2[BarsSinceEntry]+Data2(PriceScale*up익절) Then ExitLong("bp1",); if L2 <= Highest(H2,BarsSinceEntry)-Data2(PriceScale*upTR)Then ExitLong("btr1",); } if MarketPosition == -1 and IsEntryName("s1") == true Then { Si = Si+1; if H2 >= C2[BarsSinceEntry]+dnLOSS Then ExitShort(); if L2 <= C2[BarsSinceEntry]-dnLimit Then ExitShort(); if lowest(L2,BarsSinceEntry) <= C2[BarsSinceEntry]-dn최소수익 and H2 >= lowest(L2,BarsSinceEntry)+dnTRAIL Then ExitShort(); if Si == dn봉갯수 and lowest(l2,BarsSinceEntry) > C2[BarsSinceEntry]-dn최소가격변화포인트 Then ExitShort(); } Else Si = 0; if MarketPosition == -1 and IsEntryName("s1") == true Then { if H2 >= C2[BarsSinceEntry]+Data2(PriceScale*dn손절) Then ExitShort("sl1"); if L2 <= C2[BarsSinceEntry]-Data2(PriceScale*dn익절) Then ExitShort("sp1"); if L2 >= lowest(L2,BarsSinceEntry)+Data2(PriceScale*dnTR) Then ExitShort("str1"); } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 요청 > 1) 수식 부탁드립니다. 데이트레이딩 당일 발생봉으로 계산 보조data2 당일 저점에서 2000개 상승하면 buy 보조data2 당일 고점에서 2000개 하락하면 sell 2) 익절 수식 부탁드립니다. buy 경우 최소수익 2.50 달성 후 1.25 추가 상승시 exitlong 총 3.75 수익 sell 경우 최소수익 2.50 달성 후 1.25 추가 하락시 exitshort 총 3.75 수익 3) data2 보조차트에 사용할 청산수식으로 수정해 주십시요 if MarketPosition == 1 and IsEntryName("b1") == true Then { SetStopLoss(upLOSS,PointStop); SetStopProfittarget(uplimit,PointStop); SetStopTrailing(upTRAIL,up최소수익,PointStop); SetStopInactivity(up최소가격변화포인트,up봉갯수,PointStop); } if MarketPosition == 1 and IsEntryName("b1") == true Then { ExitLong("bl1",AtStop,EntryPrice-PriceScale*up손절); ExitLong("bp1",Atlimit,EntryPrice+PriceScale*up익절); ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*upTR); } if MarketPosition == -1 and IsEntryName("s1") == true Then { SetStopLoss(dnLOSS,PointStop); SetStopProfittarget(dnLimit,PointStop); SetStopTrailing(dnTRAIL,dn최소수익,PointStop); SetStopInactivity(dn최소가격변화포인트,dn봉갯수,PointStop); } if MarketPosition == -1 and IsEntryName("s1") == true Then { ExitShort("sl1",AtStop,EntryPrice+pricescale*dn손절); ExitShort("sp1",AtLimit,EntryPrice-pricescale*dn익절); ExitShort("str1",AtStop,Lowest(l,BarsSinceEntry)+pricescale*dnTR); }