답변완료
첫 질문드립니다 - 특정조건의봉 위치, 가격찾기
안녕하세요. 처음으로 인사드립니다.
작년 오프라인 강의를 시작으로 꾸준히 예스트레이더를 활용하는 회원입니다. 하루에도 많은 질문들이 올라오는데, 일일이 답변해주시는 노고에 감사드립니다.
지금까지 궁금증은 기본적으로 기존 예제를 통해 의문을 해결하고 참고하고 있었으나, 찾기 어려운 질문사항이 있어서 이렇게 문의드립니다.
문의드리고 싶은것은 특정 봉의 위치와 가격을 찾는 것으로 아래와 같습니다.
1. 여러 다양한 조건에 부합하는 특정 봉의 위치(현재기준 몇봉전에 위치하는지)를 찾는 수식
2. 여러 다양한 조건 부합하는 특정 봉의 가격(시가,종가 등)을 찾는 수식
예스랭퀴지의 '검색' 기능이 있는데 특정조건에 부합하는 봉을 지표에 표시 해주는 기능으로 알고있습니다. 이를 표시가 아닌 봉위치와 가격을 찾아 변수로 활용하게 할 수 있을까요?
(예를들어 검색된 특정 봉의 가격 이하로 떨어지면 매도, 특정봉 기준 현재 20봉 이상 지난 경우 매도 등)
(물론 조건에 따라 여러 봉이 검색되기에 현재시점 기준 몇번째인지 지정해주어야 할것으로 생각됩니다)
예시)
조건1: 시가와 종가가 모두 5일이평선 아래 위치하며
조건2: 거래량은 10일 이평선 위에 있으며
조건3: 음봉으로 끝나는 봉의 종가 & 봉의 위치
이를 바로 찾을 수 있는 수식이 있는지, 혹은 도출하는 방법이 있을지 문의드립니다.
항상 친절이 답변해주셔서 감사드립니다.
2020-03-23
643
글번호 137119
시스템
답변완료
수정 부탁드립니다
Var : RSI_Period2(6),SF2(5),QQE2(1.61),ThreshHold2(3);
var : src2(0),Wilders_Period2(0),Rsi2(0),RsiMa2(0),AtrRsi2(0),MaAtrRsi2(0);
var : dar2(0),longband2(0),shortband2(0),trend2(0),DeltaFastAtrRsi2(0);
var : RSIndex2(0),newshortband2(0),newlongband2(0);
var : cross_2(false),FastAtrRsi2TL(0);
src2 = close;
Wilders_Period2 = RSI_Period2 * 2 - 1;
Rsi2 = rsi(RSI_Period2);
RsiMa2 = ema(Rsi2, SF2);
AtrRsi2 = abs(RsiMa2[1] - RsiMa2);
MaAtrRsi2 = ema(AtrRsi2, Wilders_Period2);
dar2 = ema(MaAtrRsi2, Wilders_Period2) * QQE2;
longband2 = 0.0;
shortband2 = 0.0;
trend2 = 0;
DeltaFastAtrRsi2 = dar2;
RSIndex2 = RsiMa2;
newshortband2 = RSIndex2 + DeltaFastAtrRsi2;
newlongband2 = RSIndex2 - DeltaFastAtrRsi2;
longband2 = iff(RSIndex2[1] > longband2[1] and RSIndex2 > longband2[1] ,max(longband2[1], newlongband2) , newlongband2);
shortband2 = iff(RSIndex2[1] < shortband2[1] and RSIndex2 < shortband2[1] ,min(shortband2[1], newshortband2) , newshortband2);
cross_2 = crossup(longband2[1], RSIndex2) or CrossDown(longband2[1], RSIndex2);
trend2 = iff(crossup(RSIndex2, shortband2[1]) or CrossDown(RSIndex2, shortband2[1]) , 1 , iff(cross_2 , -1 , trend2[1]));
FastAtrRsi2TL = iff(trend2 == 1 , longband2 , shortband2);
var : QQE2zlong(0),QQE2zshort(0),hcolor2(0);
var : Greenbar1(false),Greenbar2(false),Redbar1(false),Redbar2(false);
QQE2zlong = 0;
QQE2zlong = QQE2zlong[1];
QQE2zshort = 0;
QQE2zshort = QQE2zshort[1];
QQE2zlong = iff(RSIndex2 >= 50 , QQE2zlong + 1 , 0);
QQE2zshort = iff(RSIndex2 < 50 , QQE2zshort + 1 , 0);
hcolor2 = iff(RsiMa2 - 50 > ThreshHold2 ,red,iff(RsiMa2 - 50 < 0 - ThreshHold2 ,blue,GRAY));
plot1(FastAtrRsi2TL - 50,"QQE Line");
plot2(RsiMa2 - 50,"Histo2",hcolor2);
////
// 위 내용을 1분봉에서 타주기를 쓰지 않고 5분봉 값을 표현하고 싶습니다
// 항상 노고에 감사드립니다
////
2020-03-23
424
글번호 137113
지표
답변완료
지표수정 부탁드립니다
input : nPeriod(9),factor1(0.6666666),factor2(0.3333333);
var : cn(0),ln(0),hn(0);
var : rsv(0),percentK(0),percentd(0),percentj(0),k(0);
Cn=close;
Ln=close;
Hn=close;
RSV=0.0;
percentK=0.0 ;
percentD= 0.0;
percentJ=0.0;
for k=0 to nPeriod-1
{
if Ln>low[k] then
Ln=low[k];
if Hn<high[k] then
Hn=high[k];
}
if Hn-Ln !=0 then
RSV =(Cn-Ln)/(Hn-Ln)*100;
else
RSV = 50;
percentK = factor1 * 50 + factor2 * RSV;
percentD = factor1 * 50 + factor2 * percentK;
percentJ = 3 * percentD - 2 * percentK;
plot1(percentK,"PERCENT-K");
plot2(percentD,"PERCENT-D");
plot3(percentJ,"PERCENT-J");
////
// 위 내용을 1분봉에서 타주기를 쓰지 않고 5분봉 값을 표현하고 싶습니다
// 항상 노고에 감사드립니다
////
2020-03-23
396
글번호 137112
지표