예스스탁
예스스탁 답변
2025-03-13 14:24:26
input : ShortPeriod(20), LongPeriod(38);
var : wmaFast(0), wmaSlow(0), Trend(0);
wmaFast = wma(C, ShortPeriod);
wmaSlow = wma(C, LongPeriod);
if CrossUp(wmaFast, wmaSlow) Then
Trend = -1;
if CrossDown(wmaFast, wmaSlow) Then
Trend = 1;
if trend == 1 and trend != trend[1] Then
Buy();
if trend == -1 and trend != trend[1] Then
Sell();
> 가자치타 님이 쓴 글입니다.
> 제목 : 수식변경 부탁드립니다.
> 수고하십니다
시스템 수식으로 변환 부탁 드립니다.
input : ShortPeriod(20), LongPeriod(38);
var : wmaFast(0), wmaSlow(0), Trend(0);
wmaFast = wma(C, ShortPeriod);
wmaSlow = wma(C, LongPeriod);
if CrossUp(wmaFast, wmaSlow) Then
Trend = -1;
if CrossDown(wmaFast, wmaSlow) Then
Trend = 1;
Plot1(Trend, "UpTrend", IFf(Trend == -1, RED, Blue) ,0, 5);
if wmaFast > wmaSlow and C < wmaFast Then
plot2(-0.97,"정배열조정",RGB(255,87,255) ,0, 7);
if wmaFast < wmaSlow and C > wmaFast Then
plot3(0.97,"역배열조정",RGb(255,255,87) ,0, 7);
if wmaFast > wmaSlow Then
PlotBaseLine1(1,"기준선1",RGb(10,10,10));
if wmaFast < wmaSlow Then
PlotBaseLine2(-1,"기준선2",RGb(10,10,10));
감사합니다.