답변완료
문의드립니다.
다음의 수식을 종목검색식으로 나타내고 싶습니다.
m = (highest(O, 중간기간) + lowest(O, 중간기간))/2;
m1=(avg(m*sum(1), period) - avg(sum(1), period)*avg(m, period))
/
(avg(pow(sum(1), 2), period) - (pow(avg(sum(1), period), 2)))
*(sum(1) - avg(sum(1), period))
+ avg(m, period);
A = m1 + LRS(period);
n = (highest(C, 중간기간) + lowest(C, 중간기간))/2;
n1=(avg(n*sum(1), period) - avg(sum(1), period)*avg(n, period))
/
(avg(pow(sum(1), 2), period) - (pow(avg(sum(1), period), 2)))
*(sum(1) - avg(sum(1), period))
+ avg(n, period);
B = n1 + LRS(period);
조건=CrossUp(B, A);
조건 && !조건(1)
2022-11-27
953
글번호 164191
종목검색
답변완료
지표수식 변환 요청드립니다
아래지표를 타주기분(5분)으로 변환부탁드립니다.
==================
input : length(2),mult(2),useClose(true),크기(25);
var : ATrv(0),longStop(0),longStopprev(0),shortStop(0),shortStopPrev(0);
var : hsc(0),dir(1),longcolor(Crimson),shortcolor(Blue),tx(0);
var : truehighv(0),TrueLowv(0),TrueRangev(0),hsatr(0) ;
var : xClose(0),xOpen(0),xHigh(0),xLow(0);
if index == 0 then
{
xOpen = open;
xClose = (O+H+L+C)/4;
xHigh = MaxList( high, xOpen, xClose);
xLow = MinList( low, xOpen,xClose);
}
else
{
xClose = (O+H+L+C)/4;
xOpen = (xOpen [1] + xClose [1])/2 ;
xHigh = MaxList(High, xOpen, xClose) ;
xLow = MinList(Low, xOpen, xClose) ;
}
////////
If xClose[1] > xHigh then
TrueHighv = xClose[1];
else
TrueHighv = xHigh;
If xClose[1] < xLow then
TrueLowv = xClose[1];
else
TrueLowv = xLow;
TrueRangev = TrueHighv - TrueLowv;
hsatr = ma(TrueRangev,length);
hsc = xclose ;
//////////
atrv = mult * hsatr;
longStop = IFf(useClose , highest(hsc, length) , highest(h,length)) - atrv;
longStopPrev = longStop[1];
longStop = iff(hsc[1] > longStopPrev , max(longStop, longStopPrev) , longStop);
shortStop = IFf(useClose , lowest(hsc, length) , lowest(L,length)) + atrv;
shortStopPrev = shortStop[1];
shortStop = iff(hsc[1] < shortStopPrev , min(shortStop, shortStopPrev) , shortStop);
dir = iff(hsc > shortStopPrev , 1 ,iff( hsc < longStopPrev , -1 , dir));
IF dir == 1 Then
{
plot1(longStop,"Long Stop",longColor);
NoPlot(2);
}
Else
{
NoPlot(1);
plot2(shortStop,"Short Stop",shortColor);
}
////////
if dir == 1 and dir[1] == -1 and hsc > zlsma
Then
{
tx = Text_New(sDate,sTime,longStop,"▲");
Text_SetStyle(tx,2,0);
Text_SetSize(tx, 크기);
Text_SetColor(tx,longcolor);
}
if dir == -1 and dir[1] == 1 and hsc < zlsma
Then
{
tx = Text_New(sDate,sTime,shortStop,"▼");
Text_SetStyle(tx,2,1);
Text_SetSize(tx, 크기);
Text_SetColor(tx,shortcolor);
}
=========================
##ZLSMA
Input : Period(60);
var : lsma(0),lsma2(0),eq(0),zlsma(0);
lsma = LRL(C,Period);
lsma2 = LRL(lsma,Period);
eq= lsma-lsma2 ;
zlsma = lsma+eq ;
if zlsma > zlsma[1] Then
plot1(zlsma,"lsma");
2022-11-27
681
글번호 164185
지표