커뮤니티

수식 부탁드립니다

프로필 이미지
사노소이
2025-02-19 05:34:20
360
글번호 188309
답변완료
input을 각각 100, 200, 300 세가지로 만들고, 100 이 200, 300 을 돌파할 때 마다 1계약씩 추가 진입하는 식을 부탁드립니다. input : len(100),len2(100); var : oo(0),cc(0),hh(0),ll(0),col(0); var : haclose(0),haopen(0),hahigh(0),halow(0); var : o2(0),h2(0),l2(0),c2(0); oo=ema(open,len); cc=ema(close,len); hh=ema(high,len); ll=ema(low,len); haclose = (oo+hh+ll+cc)/4; haopen = iff(IsNaN(haopen[1]) == true, (oo + cc)/2 , (haopen[1] + haclose[1]) / 2); hahigh = max (hh, max(haopen,haclose)); halow = min (ll, min(haopen,haclose)); o2=ema(haopen, len2); c2=ema(haclose, len2); h2=ema(hahigh, len2); l2=ema(halow, len2); if crossup(c2, o2) Then Buy(""); if crossdown(c2, o2) Then Sell("");
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-02-19 14:02:58

안녕하세요 예스스탁입니다. 설정창에서 피라미딩을 모든진입신호 허용으로 설정하고 적용하시면 됩니다. input : xlen(100),xlen2(100); input : ylen(200),ylen2(200); input : zlen(200),zlen2(300); var : xoo(0),xcc(0),xhh(0),xll(0); var : xhaclose(0),xhaopen(0),xhahigh(0),xhalow(0); var : xo2(0),xh2(0),xl2(0),xc2(0); var : yoo(0),ycc(0),yhh(0),yll(0); var : yhaclose(0),yhaopen(0),yhahigh(0),yhalow(0); var : yo2(0),yh2(0),yl2(0),yc2(0); var : zoo(0),zcc(0),zhh(0),zll(0); var : zhaclose(0),zhaopen(0),zhahigh(0),zhalow(0); var : zo2(0),zh2(0),zl2(0),zc2(0); xoo=ema(open,xlen); xcc=ema(close,xlen); xhh=ema(high,xlen); xll=ema(low,xlen); xhaclose = (xoo+xhh+xll+xcc)/4; xhaopen = iff(IsNaN(xhaopen[1]) == true, (xoo + xcc)/2 , (xhaopen[1] + xhaclose[1]) / 2); xhahigh = max(xhh, max(xhaopen,xhaclose)); xhalow = min (xll, min(xhaopen,xhaclose)); xo2=ema(xhaopen, xlen2); xc2=ema(xhaclose, xlen2); xh2=ema(xhahigh, xlen2); xl2=ema(xhalow, xlen2); yoo=ema(open,ylen); ycc=ema(close,ylen); yhh=ema(high,ylen); yll=ema(low,ylen); yhaclose = (yoo+yhh+yll+ycc)/4; yhaopen = iff(IsNaN(yhaopen[1]) == true, (yoo + ycc)/2 , (yhaopen[1] + yhaclose[1]) / 2); yhahigh = max(yhh, max(yhaopen,yhaclose)); yhalow = min (yll, min(yhaopen,yhaclose)); yo2=ema(yhaopen, ylen2); yc2=ema(yhaclose, ylen2); yh2=ema(yhahigh, ylen2); yl2=ema(yhalow, ylen2); zoo=ema(open,zlen); zcc=ema(close,zlen); zhh=ema(high,zlen); zll=ema(low,zlen); zhaclose = (zoo+zhh+zll+zcc)/4; zhaopen = iff(IsNaN(zhaopen[1]) == true, (zoo + zcc)/2 , (zhaopen[1] + zhaclose[1]) / 2); zhahigh = max(zhh, max(zhaopen,zhaclose)); zhalow = min (zll, min(zhaopen,zhaclose)); zo2=ema(zhaopen, zlen2); zc2=ema(zhaclose, zlen2); zh2=ema(zhahigh, zlen2); zl2=ema(zhalow, zlen2); if MarketPosition <= 0 and crossup(xc2, xo2) Then Buy("b1",OnClose,Def,1); if MarketPosition >= 0 and crossdown(xc2, xo2) Then Sell("s1",OnClose,Def,1); if MarketPosition == 1 Then { if CrossUp(xc2,yc2) Then Buy("b2",OnClose,Def,1); if CrossUp(xc2,zc2) Then Buy("b3",OnClose,Def,1); } if MarketPosition == -1 Then { if CrossDown(xc2,yc2) Then Sell("s2",OnClose,Def,1); if CrossUp(xc2,zc2) Then Sell("s3",OnClose,Def,1); } 즐거운 하루되세요 > 사노소이 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다 > input을 각각 100, 200, 300 세가지로 만들고, 100 이 200, 300 을 돌파할 때 마다 1계약씩 추가 진입하는 식을 부탁드립니다. input : len(100),len2(100); var : oo(0),cc(0),hh(0),ll(0),col(0); var : haclose(0),haopen(0),hahigh(0),halow(0); var : o2(0),h2(0),l2(0),c2(0); oo=ema(open,len); cc=ema(close,len); hh=ema(high,len); ll=ema(low,len); haclose = (oo+hh+ll+cc)/4; haopen = iff(IsNaN(haopen[1]) == true, (oo + cc)/2 , (haopen[1] + haclose[1]) / 2); hahigh = max (hh, max(haopen,haclose)); halow = min (ll, min(haopen,haclose)); o2=ema(haopen, len2); c2=ema(haclose, len2); h2=ema(hahigh, len2); l2=ema(halow, len2); if crossup(c2, o2) Then Buy(""); if crossdown(c2, o2) Then Sell("");