답변완료
강세 약세 표현
강세
a=avg(c,5);
b=highest(a,15)==a;
M=valuewhen(1,b,a);
a=avg(c,5);
b=lowest(a,15)==a;
N=valuewhen(1,b,a);
J=(M+N)*0.73 ;
C < J
약세
a=avg(c,5);
b=highest(a,15)==a;
M=valuewhen(1,b,a);
a=avg(c,5);
b=lowest(a,15)==a;
N=valuewhen(1,b,a);
J=(M+N)*0.73 ;
C > J
위는 키움식 강세 약세 수식입니다. 이를 예스에서 에떻게 표현해야 하나요 ?
그리고 그중 강세구간에 있는 종목을 종목검색 으로 어떻게 표현해야 하나요?
감사 합니다
2024-05-22
937
글번호 179891
강조
답변완료
수식 수정 좀 부탁드립니다.
아래의 원래의 식 중 몇 가지 수정 좀 부탁드립니다.
볼린저밴드(bolinger band)전략
전략실행시간 17(진입시작)-05시52분(강제청산)
1.매수:
1.종가가 볼린저 밴드 상단선 돌파
2.아래 볼린저밴드 넓이 식으로 나온값 >=0.5
1+2만족시에 종가 매수진입
2.매도:
1종가가 볼린저 밴드 하단선 이탈
2아래 볼린저밴드 넓이 식으로 나온값 >=0.5
1+2만족시에 종가 매도진입
손절
1.매수:일목구름대 중심선 이탈시 실시간 손절
2.매도;일목구름대 중심선 돌파시 실시간 손절
익절
기존대로
재진입
익절 손절 모두 1+2만족시에 종가 재진입
볼린저밴드 넓이구하는 식
Inputs: Period(20), D(2);
Variables: BBTop(0), BBMid(0), BBBot(0),Bwidth(0);
BBTop = BollBandUp(Period,D);
BBMid = ma(C,Period);
BBBot = BollBandDown(Period,D);
BWidth = ((BBTop - BBBot)/ BBMid)*100;
Plot1(Bwidth, "Band Width");
PlotBaseLine1(0);
input : starttime(213000),Endtime(055000);
Inputs: Length(20), StdDev(2), Bars(2);
Var : BBTop(0),BBBot(0),T(0);
var : Tcond(False),trade(False),Sarv(0),entry(0);
BBTop = BollBandup(Length, StdDev);
BBBot = BollBanddown(Length, StdDev);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
trade = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
T = 0;
if C > value1 and C > Sarv Then
T = 1;
if C < value2 and C < Sarv Then
T = -1;
}
Else
{
if T == 1 and !(C > value1 and C > Sarv) Then
T = 0;
if T == -1 and !(C < value2 and C < Sarv) Then
T = 0;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if Tcond == true and Trade == true Then
{
If MarketPosition <= 0 and CrossUp(C,BBTop) and C > O Then
{
Buy("b");
ExitLong("bx1",AtStop,L);
}
If MarketPosition >= 0 and CrossDown(C,BBBot) and C < O Then
{
Sell("s");
ExitShort("sx1",AtStop,H);
}
}
if MarketPosition == 1 Then
{
ExitLong("bx2",AtStop,L[BarsSinceEntry]);
}
if MarketPosition == -1 Then
{
ExitShort("sx2",AtStop,H[BarsSinceEntry]);
}
SetStopProfittarget(1000,PointStop);
#고가가 저가대비 300포인트 이상 크면
if Tcond == true and H >= L+300 Then
{
#trade는 False
trade = False;
#매수포지션이면 청산
if MarketPosition == 1 Then
exitlong();
#매도포지션이면 청산
if MarketPosition == -1 Then
ExitShort();
}
2024-05-22
1135
글번호 179887
시스템
답변완료
종목검색식 문의입니다.
아래 수식은 키움증권 영웅문에서 사용 중인 신심리도 수식입니다. 이것을 예스스팟 수식으로 변경할 수 있을까요? (아래 조건의 종목검색 수식을 부탁드려요)
(sum(if(C>C(1),1,0),10)*sum(if(C>C(1),C-C(1),0),10)/(sum(if(C>C(1),C-C(1),0),10)+sum(if(C<C(1),C(1)-C,0),10))-sum(if(C<C(1),1,0),10)*sum(if(C<C(1),C(1)-C,0),10)/(sum(if(C>C(1),C-C(1),0),10)+sum(if(C<C(1),C(1)-C,0),10)))/10 < 0.5
2024-05-22
865
글번호 179886
종목검색
답변완료
문의 드립니다.
Input : a(1), length(10),크기(15);
var : truehighv(0),TrueLowv(0),TrueRangev(0),xatr(0),nLoss(0),src(0) ;
var : xClose(0),xOpen(0),xHigh(0),xLow(0);
var : xATRTrailingStop(0),poss(0), emav(0), ab(False), be(False),tx(0) ;
var : dir(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;
xatr = ma(TrueRangev,length);
nLoss = a * xatr ;
##########
src = xClose ;
xATRTrailingStop = 0.0 ;
xATRTrailingStop = iff(src > xATRTrailingStop[1] and src[1] > xATRTrailingStop[1],
max(xATRTrailingStop[1], src - nLoss),
iff(src < xATRTrailingStop[1] and src[1] < xATRTrailingStop[1],
min(xATRTrailingStop[1],src + nLoss),
iff(src > xATRTrailingStop[1], src - nLoss, src + nLoss)));
poss = 0 ;
poss = iff(src[1] < xATRTrailingStop[1] and src > xATRTrailingStop[1], 1,
iff(src[1] > xATRTrailingStop[1] and src < xATRTrailingStop[1], -1, poss[1])) ;
emav = ema(src,1);
if crossup(emav, xATRTrailingStop) Then
ab = true ;
Else
ab = False;
if crossup(xATRTrailingStop, emav) Then
be = true ;
Else
be = False;
////////////
dir = iff(src > xATRTrailingStop and ab == true , 1 ,iff( src < xATRTrailingStop and be == true , -1 , dir));
Plot1( dir);
if dir == 1 and dir[1] == -1
Then
{
tx = Text_New(sDate,sTime,low,"▲");
Text_SetStyle(tx,2,0);
Text_SetSize(tx, 크기);
Text_SetColor(tx,black);
}
if dir == -1 and dir[1] == 1
Then
{
tx = Text_New(sDate,sTime,high,"▼");
Text_SetStyle(tx,2,1);
Text_SetSize(tx, 크기);
Text_SetColor(tx,black);
}
위 수식을 시스템식으로 좀 바꿔주세요.
2024-05-22
962
글번호 179884
시스템