커뮤니티

부탁좀 드리겠습니다.

프로필 이미지
harrywin
2020-08-25 19:34:41
1025
글번호 141755
답변완료
TRIXv = TRIX(period); emav = ema(c,Period); if crossup(TRIXv,0) Then { value1 = emav; value3 = emav; } if CrossDown(TRIXv,0) Then value2 = emav; if value1 > 0 and emav > value1 Then value1 = emav; if value2 > 0 and emav < value2 Then value2 = emav; if value3 > 0 and emav < value3 Then value3 = emav; plot1(value1); plot2(value2); plot3(max(value1,emav)); plot4(max(value3,emav)); 2) 변환부탁드립니다 highest(high,기간) lowest(low,기간) ((highest(high,기간))+(lowest(low,기간)))/2 3) highest(h,period) HIL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2)); highest(H, period)-(((highest(H, period)-HIL)/3)*1) HIL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2)); highest(H, period)-(((highest(H, period)-HIL)/4)*3) HIL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2)); highest(H, period)-(((highest(H, period)-HIL)/5)*3) HIL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2)); highest(H, period)-(((highest(H, period)-HIL)/6)*4) period = 300 4) 수식1> highest(h, period) 수식2> A = (highest(h, period) + lowest(l, period))/2; B = highest(h, period); A + (B-A)*4/6 수식3> A = (highest(h, period) + lowest(l, period))/2; B = highest(h, period); A + (B-A)*3/4 수식4> A = (highest(h, period) + lowest(l, period))/3; B = highest(h, period); A + (B-A)*2/5 수식5> (highest(h, period) + lowest(l, period))/4 period=2000
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-08-25 19:21:23

안녕하세요 예스스탁입니다. 1 올려주신 그림과 같이 빨강선과 파랑선으로 구분이 어려울것 같습니다. 아래 지표 적용해 보시면 plot4의 값이 미세하게 상승과 하락이 반복되어 상승후에 하락, 하락후에 상승판단이 자주 발생하게 됩니다. 해당 부분은 %나 봉수로 제어를 해보려고 했지만 여의치가 않습니다. 원하신 그림과 같이 구현되려면 좀더 다른방법의 조건이 필요할것 같습니다. 수식안에서 색채우기 설정이 가능하지 않습니다. 지표식 작성후에 문법검증(f4) 완료하시고 f5키를 누르시면 지표속성화면이 나타납니다. 지표속성화면탭에서 그림과 같이 채우기와 Y축 지정하시고 차트에 적용하시면 됩니다. 올려주신 수식의 plot1과 plot3은 같은 값입니다. 그래서 plot3은 주석처리로 막았습니다. input : Period(10); var : TRIXv(0),Emav(0),T(0),TL1(0),TL2(0); TRIXv = TRIX(period); emav = ema(c,Period); if crossup(TRIXv,0) Then { value1 = emav; value3 = emav; } if CrossDown(TRIXv,0) Then value2 = emav; if value1 > 0 and emav > value1 Then value1 = emav; if value2 > 0 and emav < value2 Then value2 = emav; if value3 > 0 and emav < value3 Then value3 = emav; var1 = max(value3,Emav); if t <= 0 and CrossUp(value1,var1) Then { t = 1; } if t >= 0 and CrossDown(value2,var1) Then { t = -1; } if Value2 < var1 and Value2[1] == var1[1] Then { TL1 = TL_New(sDate,sTime,0,sDate,sTime,09999999); TL_SetColor(TL1,MAGENTA); } if Value2 == var1 and Value2[1] < var1[1] Then { TL1 = TL_New(sDate,sTime,0,sDate,sTime,09999999); TL_SetColor(TL1,BLACK); } if Value1 > var1 and Value1[1] == var1[1] Then { TL2 = TL_New(sDate,sTime,0,sDate,sTime,09999999); TL_SetColor(TL2,CYAN); } if Value1 == var1 and Value1[1] > var1[1] Then { TL2 = TL_New(sDate,sTime,0,sDate,sTime,09999999); TL_SetColor(TL2,BLACK); } if value1 > 0 Then plot1(value1,"상단",BLUE); if value2 > 0 Then plot2(value2,"하단",RED); #plot3(max(value1,emav),"v3",MAGENTA); if var1 > 0 Then plot4(var1,"값",IFf(T == 1,BLUE,RED)); 2 input : 기간(20); var1 = highest(high,기간); var2 = lowest(low,기간); Var3 = (var1+Var2)/2; Plot1(var1,"최고"); Plot2(var2,"최저"); Plot3(var3,"중간"); 3 input : Period(300); var : HIL(0); var1 = highest(h,period); Var2 = lowest(l,period); if var1 > var1[1] then HIL = (var1+Var2)/2; value1 = var1-((var1-HIL)/3)*1; value2 = var1-((var1-HIL)/4)*3; value3 = var1-((var1-HIL)/5)*3; value4 = var1-((var1-HIL)/6)*4; Plot1(value1); Plot2(value2); Plot3(value3); Plot4(value4); 4 input : Period(2000); var1 = highest(h,period); Var2 = Lowest(l,Period); var3 = (var1+Var2)/2; var4 = (var1+Var2)/4; Plot1(var1); plot2(var3+(var1-Var3)*4/6); plot3(var3+(var1-Var3)*3/4); plot4(var3+(var1-Var3)*2/5); plot5(var4); 즐거운 하루되세요 > harrywin 님이 쓴 글입니다. > 제목 : 부탁좀 드리겠습니다. > TRIXv = TRIX(period); emav = ema(c,Period); if crossup(TRIXv,0) Then { value1 = emav; value3 = emav; } if CrossDown(TRIXv,0) Then value2 = emav; if value1 > 0 and emav > value1 Then value1 = emav; if value2 > 0 and emav < value2 Then value2 = emav; if value3 > 0 and emav < value3 Then value3 = emav; plot1(value1); plot2(value2); plot3(max(value1,emav)); plot4(max(value3,emav)); 2) 변환부탁드립니다 highest(high,기간) lowest(low,기간) ((highest(high,기간))+(lowest(low,기간)))/2 3) highest(h,period) HIL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2)); highest(H, period)-(((highest(H, period)-HIL)/3)*1) HIL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2)); highest(H, period)-(((highest(H, period)-HIL)/4)*3) HIL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2)); highest(H, period)-(((highest(H, period)-HIL)/5)*3) HIL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2)); highest(H, period)-(((highest(H, period)-HIL)/6)*4) period = 300 4) 수식1> highest(h, period) 수식2> A = (highest(h, period) + lowest(l, period))/2; B = highest(h, period); A + (B-A)*4/6 수식3> A = (highest(h, period) + lowest(l, period))/2; B = highest(h, period); A + (B-A)*3/4 수식4> A = (highest(h, period) + lowest(l, period))/3; B = highest(h, period); A + (B-A)*2/5 수식5> (highest(h, period) + lowest(l, period))/4 period=2000