커뮤니티

수식 문의

프로필 이미지
흑수돌
2022-06-03 14:11:47
1479
글번호 159587
답변완료

첨부 이미지

아래 지표는 하캔아쉬 지표를 더욱 스무드하게 만든 지표 입니다.. 아래 수식을 예트로 변환하고 싶습니다. 링크 첨부 해 드립니다. 여러 회원님들도 도움 되시기 바랍니다. 이미 문의하신 회원님 계실 수 있겠는데 찾을 수가 없어 다시 문의 드립니다. 부탁좀 드리겠습니다. 감사합니다 //PRC_HPT Heikin Ashi Smoothed | indicator //25.04.2017 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //translated from MT4 indicator code //---settings //MaPeriod=6 //MaPeriod2=2 //---end of settings once maOpen=Open once maClose=Close once maLow=Low once maHigh=High if barindex>0 then maOpen=(maOpen[1]*(MAperiod-1)+Open)/MAPeriod maClose=(maClose[1]*(MAperiod-1)+Close)/MAPeriod maLow=(maLow[1]*(MAperiod-1)+Low)/MAPeriod maHigh=(maHigh[1]*(MAperiod-1)+High)/MAPeriod haOpen=(ExtMapBuffer5[1]+ExtMapBuffer6[1])/2 haClose=(maOpen+maHigh+maLow+maClose)/4 haHigh=Max(maHigh, Max(haOpen, haClose)) haLow=Min(maLow, Min(haOpen, haClose)) if (haOpen<haClose) then r=0 g=191 b=255 ExtMapBuffer7=haLow ExtMapBuffer8=haHigh else r=255 g=10 b=0 ExtMapBuffer7=haHigh ExtMapBuffer8=haLow endif ExtMapBuffer5=haOpen ExtMapBuffer6=haClose ExtMapBuffer1=weightedaverage[MAperiod2](ExtMapBuffer7) ExtMapBuffer2=weightedaverage[MAperiod2](ExtMapBuffer8) ExtMapBuffer3=weightedaverage[MAperiod2](ExtMapBuffer5) ExtMapBuffer4=weightedaverage[MAperiod2](ExtMapBuffer6) endif DRAWCANDLE(ExtMapBuffer3,ExtMapBuffer2,ExtMapBuffer1,ExtMapBuffer4) coloured(r,g,b) short = ExtMapBuffer7[1]>ExtMapBuffer8[1] and ExtMapBuffer7[2]<ExtMapBuffer8[2] and ExtMapBuffer7[0]>ExtMapBuffer8[0] long = ExtMapBuffer7[1]<ExtMapBuffer8[1] and ExtMapBuffer7[2]>ExtMapBuffer8[2] and ExtMapBuffer7[0]<ExtMapBuffer8[0] RETURN long as "long signal", short as "short signal" https://www.prorealcode.com/prorealtime-indicators/hpt-heikin-ashi-smoothed/
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-06-03 14:35:48

안녕하세요 예스스탁입니다. 1 강조식 input : MaPeriod(6),MaPeriod2(2); var : maOpen(0),maClose(0),maLow(0),maHigh(0); var : haOpen(0),haClose(0),haLow(0),haHigh(0); var : ExtMapBuffer5(0),ExtMapBuffer6(0),ExtMapBuffer4(0),ExtMapBuffer3(0),ExtMapBuffer2(0),ExtMapBuffer1(0); var : ExtMapBuffer7(0),ExtMapBuffer8(0); var : r(0),g(0),b(0); if Index == 0 Then { maOpen=Open; maClose=Close; maLow=Low; maHigh=High; } Else { maOpen=(maOpen[1]*(MAperiod-1)+Open)/MAPeriod; maClose=(maClose[1]*(MAperiod-1)+Close)/MAPeriod; maLow=(maLow[1]*(MAperiod-1)+Low)/MAPeriod; maHigh=(maHigh[1]*(MAperiod-1)+High)/MAPeriod; haOpen=(ExtMapBuffer5[1]+ExtMapBuffer6[1])/2; haClose=(maOpen+maHigh+maLow+maClose)/4; haHigh=Max(maHigh, Max(haOpen, haClose)); haLow=Min(maLow, Min(haOpen, haClose)); if (haOpen<haClose) then { r=0; g=191; b=255; ExtMapBuffer7=haLow; ExtMapBuffer8=haHigh; } else { r=255; g=10; b=0; ExtMapBuffer7=haHigh; ExtMapBuffer8=haLow; } ExtMapBuffer5=haOpen; ExtMapBuffer6=haClose; ExtMapBuffer1=WMA(ExtMapBuffer7,MAperiod2); ExtMapBuffer2=WMA(ExtMapBuffer8,MAperiod2); ExtMapBuffer3=WMA(ExtMapBuffer5,MAperiod2); ExtMapBuffer4=WMA(ExtMapBuffer6,MAperiod2); } PlotPaintBar(ExtMapBuffer2,ExtMapBuffer1,ExtMapBuffer3,ExtMapBuffer4,"강조",Rgb(r,g,b)); 2 시스템 input : MaPeriod(6),MaPeriod2(2); var : maOpen(0),maClose(0),maLow(0),maHigh(0); var : haOpen(0),haClose(0),haLow(0),haHigh(0); var : ExtMapBuffer5(0),ExtMapBuffer6(0),ExtMapBuffer4(0),ExtMapBuffer3(0),ExtMapBuffer2(0),ExtMapBuffer1(0); var : ExtMapBuffer7(0),ExtMapBuffer8(0); var : r(0),g(0),b(0),short(False),long(False); if Index == 0 Then { maOpen=Open; maClose=Close; maLow=Low; maHigh=High; } Else { maOpen=(maOpen[1]*(MAperiod-1)+Open)/MAPeriod; maClose=(maClose[1]*(MAperiod-1)+Close)/MAPeriod; maLow=(maLow[1]*(MAperiod-1)+Low)/MAPeriod; maHigh=(maHigh[1]*(MAperiod-1)+High)/MAPeriod; haOpen=(ExtMapBuffer5[1]+ExtMapBuffer6[1])/2; haClose=(maOpen+maHigh+maLow+maClose)/4; haHigh=Max(maHigh, Max(haOpen, haClose)); haLow=Min(maLow, Min(haOpen, haClose)); if (haOpen<haClose) then { r=0; g=191; b=255; ExtMapBuffer7=haLow; ExtMapBuffer8=haHigh; } else { r=255; g=10; b=0; ExtMapBuffer7=haHigh; ExtMapBuffer8=haLow; } ExtMapBuffer5=haOpen; ExtMapBuffer6=haClose; ExtMapBuffer1=WMA(ExtMapBuffer7,MAperiod2); ExtMapBuffer2=WMA(ExtMapBuffer8,MAperiod2); ExtMapBuffer3=WMA(ExtMapBuffer5,MAperiod2); ExtMapBuffer4=WMA(ExtMapBuffer6,MAperiod2); } short = ExtMapBuffer7[1]>ExtMapBuffer8[1] and ExtMapBuffer7[2]<ExtMapBuffer8[2] and ExtMapBuffer7[0]>ExtMapBuffer8[0]; long = ExtMapBuffer7[1]<ExtMapBuffer8[1] and ExtMapBuffer7[2]>ExtMapBuffer8[2] and ExtMapBuffer7[0]<ExtMapBuffer8[0]; if long Then Buy(); if short Then Sell(); 즐거운 하루되세요 > 흑수돌 님이 쓴 글입니다. > 제목 : 수식 문의 > 아래 지표는 하캔아쉬 지표를 더욱 스무드하게 만든 지표 입니다.. 아래 수식을 예트로 변환하고 싶습니다. 링크 첨부 해 드립니다. 여러 회원님들도 도움 되시기 바랍니다. 이미 문의하신 회원님 계실 수 있겠는데 찾을 수가 없어 다시 문의 드립니다. 부탁좀 드리겠습니다. 감사합니다 //PRC_HPT Heikin Ashi Smoothed | indicator //25.04.2017 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //translated from MT4 indicator code //---settings //MaPeriod=6 //MaPeriod2=2 //---end of settings once maOpen=Open once maClose=Close once maLow=Low once maHigh=High if barindex>0 then maOpen=(maOpen[1]*(MAperiod-1)+Open)/MAPeriod maClose=(maClose[1]*(MAperiod-1)+Close)/MAPeriod maLow=(maLow[1]*(MAperiod-1)+Low)/MAPeriod maHigh=(maHigh[1]*(MAperiod-1)+High)/MAPeriod haOpen=(ExtMapBuffer5[1]+ExtMapBuffer6[1])/2 haClose=(maOpen+maHigh+maLow+maClose)/4 haHigh=Max(maHigh, Max(haOpen, haClose)) haLow=Min(maLow, Min(haOpen, haClose)) if (haOpen<haClose) then r=0 g=191 b=255 ExtMapBuffer7=haLow ExtMapBuffer8=haHigh else r=255 g=10 b=0 ExtMapBuffer7=haHigh ExtMapBuffer8=haLow endif ExtMapBuffer5=haOpen ExtMapBuffer6=haClose ExtMapBuffer1=weightedaverage[MAperiod2](ExtMapBuffer7) ExtMapBuffer2=weightedaverage[MAperiod2](ExtMapBuffer8) ExtMapBuffer3=weightedaverage[MAperiod2](ExtMapBuffer5) ExtMapBuffer4=weightedaverage[MAperiod2](ExtMapBuffer6) endif DRAWCANDLE(ExtMapBuffer3,ExtMapBuffer2,ExtMapBuffer1,ExtMapBuffer4) coloured(r,g,b) short = ExtMapBuffer7[1]>ExtMapBuffer8[1] and ExtMapBuffer7[2]<ExtMapBuffer8[2] and ExtMapBuffer7[0]>ExtMapBuffer8[0] long = ExtMapBuffer7[1]<ExtMapBuffer8[1] and ExtMapBuffer7[2]>ExtMapBuffer8[2] and ExtMapBuffer7[0]<ExtMapBuffer8[0] RETURN long as "long signal", short as "short signal" https://www.prorealcode.com/prorealtime-indicators/hpt-heikin-ashi-smoothed/