답변완료
문의드립니다.
아래의 수식을 예스트레이더에서 종목검색을 하려면 어떻게 작성해야 하는지 여쭤봅니다.
a1=PVI(c);
a2=highest(avg(PVI(c),Period),224);
b1=avg(PVI(c),Period);
(a1-b1)<=(a1*0.025)
&&
a1(1)<a2
&&
pvi(c)>=highest(PVI(c),224)
&&
crossup(a1,a2)
&&
eavg(c,448)>eavg(c,224)
&&
eavg(c,224)>eavg(c,112)
&&
eavg(c,112)<c
&&
pvi(c)>=avg(pvi(c),9)
&&
nvi(c)>=avg(nvi(c),9)
and
c<=(c(1)*1.14)
입니다.
2020-04-30
1151
글번호 138530
종목검색
답변완료
문의드립니다
수고하십니다
1, 일목균형표에서 "기준선"이 "캔들"과 만났을때 음성신호 발생수식좀 부탁드립니다 (야래수식1)
2, 아래 수식에서 지표속성창에서 색채우기를 할때... (아래수식2)
국선챠트에서는 잘 적용이 되는데 옵션챠트에서는 안되네요
뭔가 수식의 수정이 필요한것인지?
혹은 설정방법을 달리해야하는것인지 문의 드립니다
3, 아래 수식을 적용시... (아래수식3)
data1과 data2로 교차챠트를 만들어서 각각 임의의 콜풋행사가를 적용하여보면 행사가에 따라서
선의 발생개수가 달라집니다
즉, 선이 2개모두 발생하는 경우와 1개발생, 혹은 아예 발생이 안되는 경우도 있습니다
(1) 이 지표상 2개의선이 모두 발생될수있는 조건이 무엇인지요?
수고스러우시겠지만 자세한 설명 부탁드립니다
(2) 어떤 행사가를 적용하더라도 모든경우에 다 2개의선이 발생되는 수식으로 수정가능하다면 부탁드리겠습니다
감사합니다!!!
-------------------------------------------------------------------------------------
(수식 1)
Inputs: TurnLen(9), StdLen(26), PrdLen(52);
Variables: 기준선(0), 전환선(0), 후행스팬(0), 선행스팬1(0), 선행스팬2(0);
전환선 = (Highest(High, TurnLen) + Lowest(Low, TurnLen)) / 2;
기준선 = (Highest(High, StdLen) + Lowest(Low, StdLen)) / 2;
후행스팬 = Close ;
선행스팬1 = (전환선 + 기준선) / 2 ;
선행스팬2 = (Highest(High, PrdLen) + Lowest(Low, PrdLen)) / 2;
Plot1(전환선, "전환선");
Plot2(기준선, "기준선");
Plot3(후행스팬, "후행스팬");
Plot4(선행스팬1,"선행스팬1");
Plot5(선행스팬2, "선행스팬2");
(수식 2)
input : 기간(20),k(0.03);
var1 = highest(H,기간)[1];
var11 = var1*(1+k/100);
var2 = lowest(L,기간)[1];
var22 = var2*(1+k/100);
plot1(var1,"고점");
plot2(var11,"고점+k%");
plot3(var2,"저점");
plot4(var22,"저점+k%");
(수식 3)
input : N(5);
var : cond1(false,data1),cond2(false,data1);
var : V1(0,data1),V2(0,data1);
if data1(Bdate != bdate[1]) Then
{
cond1 = false;
cond2 = false;
}
if abs(data1(highD(0))-data2(highD(0))) <= PriceScale*N Then
{
cond1 = true;
v1 = data1(highD(0));
}
if abs(data1(LowD(0))-data2(LowD(0))) <= PriceScale*N Then
{
cond2 = true;
v2 = data1(LowD(0));
}
if Cond1 == true Then
plot1(V1);
if Cond2 == true Then
plot2(V2);
2020-05-04
1159
글번호 138529
지표
답변완료
문의드립니다
안녕하세요?
아래수식의 매수나매도 신호발생시 신호발생봉에 지표수식의 plot3 또는 plot4 와 동시에발생하는 봉에서만 신호가 발생하도록 조건문을 추가하고 싶습니다
도움주셔서 감사합니다
1.
Input : af1(0.02), maxAF1(0.2),af2(0.35), maxAF2(0.2);
Var : V1(0),V2(0);
V1 = Sar(af1,maxAF1);
V2 = Sar(af2,maxAF2);
if crossup(c,v1) and crossup(C,v2) Then
Buy();
If CrossDown(c,v1) and CrossDown(c,v2) Then
Sell();
2.
Input:length(12);
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
For j = 0 To 9
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Highest(H,length) == H and lastHiVal <> H;
Condition2 = Lowest(L,length) == L and lastLoVal <> L;
If Condition1 Then lastHiVal = H;
If Condition2 Then lastLoVal = L;
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
If turnPntBit <> "" Then
{
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H,L);
barArr[1] = 0;
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
If turnPntBit <> turnPntArr[1] Then
{
for j = 8 downto 1
{
valArr[j+1] = valArr[j];
barArr[j+1] = barArr[j];
turnPntArr[j+1] = turnPntArr[j];
}
}
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H) or
(turnPntBit == "Lo" and valArr[1] > L))) Then
{
valArr[1] = IFF(turnPntBit == "Hi",H,L);
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] Then
{
TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Plot3(H,"점1",MAGENTA);
}
Else
{
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
Plot4(H,"점2",CYAN);
}
}
}
2020-05-05
838
글번호 138526
시스템
답변완료
함수 수식도움을 부탁드립니다.
heiken-ashi 차트를 이용해서 매매를 하고 있는데요
1.
var : Xclose(0),xOpen(0),Xhigh(0),Xlow(0);
xClose = (Open+High+Low+Close)/4;
xOpen = (Open[1] + Close[1])/2 ;
xHigh = Max(High, xOpen, xClose);
xLow = Min(Low, xOpen, xClose) ;
이렇게 하니
현재보여지는 캔들기준으로 신호가 나오네요..(키움에서도 heiken 차트를 켜야만 신호가 제대로 나오드라구요.)
차트에서 heiken-ashi 를 제공해주면 되는데 없다보니..
2.
if index==0 Then
{
xClose = (Open+High+Low+Close)/4;
xOpen = open;
xHigh = Max(High, Open, Close);
xLow = Min(Low, Open, Close);
}
Else
{
xClose = (xOpen+xHigh+xLow+xClose)/4;
xOpen = (xOpen[1] + Xclose[1])/2;
xHigh = Max(High, xOpen, xClose);
xLow = Min(Low, xOpen, xClose) ;
}
# 매수/매수청산
If MarketPosition == 0 and xclose[1]<xopen[1] and xclose>xopen Then Buy();
If MarketPosition == 0 and xclose[1]>xopen[1] and xclose<xopen Then Sell();
If MarketPosition == 1 and xclose[1]>xopen[1] and xclose<xopen Then exitlong("");
If MarketPosition == -1 and xclose[1]<xopen[1] and xclose>xopen Then exitshort("");
이런식으로 고치니 안되네요.....
계속 봉차트를 인식하네요
해결이 안되네요
기존 질의응답 검색해서 답변하신거 적용해봐도
봉차트 기준으로만 적용이 됩니다.
고견부탁드립니다 ^^
2020-05-04
862
글번호 138524
시스템
답변완료
문의드립니다
안녕하세요?
1번수식의 기울기에따라 알림음을 봉완성시까지 출력되게 하고싶습니다
2번수식의 기준선을 제외한 두선 모두 기울기에따라 빨강 파랑으로 선의색을
표현되게 하여주세요 그리고 기울기에따라 두선 각각 소리출력도 부탁드립니다
도움주셔서 감사합니다
1.
input : len(20),FC(1),SC(200);
var : Price(0),Len1(0),e(0),w(0);
var : H1(0),L1(0),N1(0),H2(0),L2(0),N2(0),H3(0),L3(0),N3(0),out(0);
var : dimen1(0),dimen(0),alpha1(0),oldalpha(0),oldN(0),N(0),alpha_(0),alpha(0),col(0);
price = c;
if CurrentBar >= 1 then
{
len1 = len/2;
e = 2.7182818284590452353602874713527;
w = log(2/(SC+1)) / log(e);
H1 = highest(high,len1);
L1 = lowest(low,len1);
N1 = (H1-L1)/len1;
H2 = highest(high,len1)[len1];
L2 = lowest(low,len1)[len1];
N2 = (H2-L2)/len1;
H3 = highest(high,len);
L3 = lowest(low,len);
N3 = (H3-L3)/len;
dimen1 = (log(N1+N2)-log(N3))/log(2);
dimen = iff(N1>0 and N2>0 and N3>0,dimen1,dimen1[1]);
alpha1 = exp(w*(dimen-1));
oldalpha = iff(alpha1>1,1,iff(alpha1<0.01,0.01,alpha1));
oldN = (2-oldalpha)/oldalpha;
N = (((SC-FC)*(oldN-1))/(SC-1))+FC;
alpha_ = 2/(N+1);
alpha = iff(alpha_< 2/(SC+1),2/(SC+1),iff(alpha_>1,1,alpha_));
if IsNaN(alpha) == false then
out = (1-alpha)*out[1] + alpha*price;
if out > out[1] Then
col = YELLOW;
Else
col = blue;
plot1(out,"FRAMA",col);
2.
Input : maPeriod(20), ROCPeriod(12), stoPeriod1(5), stoPeriod2(3), sPeriod(12), IPeriod(26),sigPeriod(9);
var : BinaryWave(0),BWMACD(0),BWMACDsig(0);
BinaryWave = BW(maPeriod,ROCPeriod,stoPeriod1,stoPeriod2);
BWMACD = ema(BinaryWave,sPeriod)-ema(BinaryWave,IPeriod);
BWMACDsig = ema(BWMACD,sigPeriod);
Plot1(BWMACD,"BW MACD");
Plot2(BWMACDsig,"BW MACD_Sig");
PlotBaseLine1(0, "기준선0");
2020-04-29
1074
글번호 138506
지표