예스스탁
예스스탁 답변
2024-04-11 10:59:52
안녕하세요
예스스탁입니다.
input : conv(50),length(20);
input : Period(14);
var : src(close),maxv(0),minv(0),diff(0),psi(0);
var : ADXv(0),DP(0),DM(0);
src = c;
maxv = iff(isnan(maxv[1]) == true, src, max(src, maxv - (maxv - src) / conv));
minv = IFf(isnan(minv[1]) == true, src, min(src, minv + (src - minv) / conv));
diff = Log(maxv - minv);
psi = -50 * correlation(diff, index, length) + 50;
ADXv = ADX(Period);
DP = DiPlus(Period);
DM = DiMinus(Period);
if MarketPosition <= 0 and psi < 80 and DP > DM Then
Buy();
if MarketPosition == 1 and Psi >= 80 Then
ExitLong();
if MarketPosition >= 0 and psi < 80 and DP < DM Then
Sell();
if MarketPosition == -1 and Psi >= 80 Then
ExitShort();
즐거운 하루되세요
> 디엠 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> input : conv(50),length(20);
var : src(close),maxv(0),minv(0),diff(0),psi(0);
src = c;
maxv = iff(isnan(maxv[1]) == true, src, max(src, maxv - (maxv - src) / conv));
minv = IFf(isnan(minv[1]) == true, src, min(src, minv + (src - minv) / conv));
diff = Log(maxv - minv);
psi = -50 * correlation(diff, index, length) + 50;
if psi <= 80 Then
{
plot1(psi, "PSI1");
NoPlot(2);
}
Else
{
NoPlot(1);
plot2(psi, "점");
}
PlotBaseLine1(80);
=======================
위 지표에서 psi가 80미만이고 dmi지표에서 dp(플러스)가 dm(마이너스)보다 클때 매수
psi가 80이상일 때 매수 청산
psi가 80미만이고 dmi지표에서 dm가 dp보다 클때 매도
psi가 80이상일때 매도 청산
psi가 80이상일 때 매도 청산
dmi수치를 조정할수 있게 해 주시면 감사합니다.