예스스탁
예스스탁 답변
2020-03-31 09:07:29
안녕하세요
예스스탁입니다.
Input : RSIPeriod(7),RSI매수값(30),SimPeriod(7),심리도값(24);
Input : N1(1),초기화(7);
Input : CCI기간(20),CCI값(300),CCI값1(180);
Input : 하락틱수(15);
Input : 즉시익절1(150),즉시손절1(75);
Input : 분할매수횟수(1),분할매수틱수(50);
Input : RSIPeriod1(8),A(15),B(0);
Input : N2(0.6),N3(0.02);
Input : tr수익(100),tr하락(125);
Input : 거래량1(1600),거래량2(16000);
Input : 저점손절틱수(20);
Input : N4(0.85),N5(0.85);
Input : 본전생각틱(70);
input : P(20),dv(4.5);
input : af(0.02),maxaf(0.2);
var : BBup(0,data1),cond1(false,data1),cond2(false,data1),v1(0,data1),v2(0,data1);
var : cnt(0,data1),SigSum(0,data1),count2(0,data1),RSIsig(0,data1);
Var : Counter(0,data1), DownAmt(0,data1), UpAmt(0,data1), UpSum(0,data1), DownSum(0,data1), UpAvg(0,data1), DownAvg(0,data1);
var : idx(0,data1), PreUpAvg(0,data1), preDownAvg(0,data1),RSIVv(0,data1);
var : CCIv(0,data1),RSIv(0,data1),Simri(0,data1),BuySetup(false,data1),DD(0,data1),entry(0,data1);
var : sarv(0,data2);
Array : C1[100](0,data1);
BBup = data1(BollBandUp(P,dv));
CCIv = data1(CCI(CCI기간));
RSIV = data1(RSI(RSIPeriod));
Simri = data1(Simrido(SimPeriod));
sarv = data2(sar(af,maxaf));
if data1(Bdate != Bdate[1]) Then
{
for cnt = 1 to 99
{
C1[cnt] = C1[cnt-1][1];
}
PreUpAvg = UpAvg[1];
preDownAvg = DownAvg[1];
idx = idx + 1;
}
C1[0] = data1(C);
If idx == RSIPeriod1+2 Then
{
UpSum = 0;
DownSum = 0;
For Counter = 0 To RSIPeriod1 - 1
{
UpAmt = C1[Counter] - C1[Counter+1];
If UpAmt >= 0 Then
DownAmt = 0;
Else
{
DownAmt = -UpAmt;
UpAmt = 0;
}
UpSum = UpSum + UpAmt;
DownSum = DownSum + DownAmt;
}
UpAvg = UpSum / RSIPeriod1;
DownAvg = DownSum / RSIPeriod1;
}
If idx > RSIPeriod1+2 Then
{
UpAmt = C1[0] - C1[1];
If UpAmt >= 0 Then
DownAmt = 0;
Else
{
DownAmt = -UpAmt;
UpAmt = 0;
}
UpAvg = (PreUpAvg * (RSIPeriod1 - 1) + UpAmt) / RSIPeriod1;
DownAvg = (preDownAvg * (RSIPeriod1 - 1) + DownAmt) / RSIPeriod1;
}
If UpAvg + DownAvg <> 0 Then
RSIvv = 100 * UpAvg / (UpAvg + DownAvg);
Else
RSIvv = 0;
if data1(bdate != bdate[1]) Then
{
Entry = 0;
Cond2 = true;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
if TotalTrades > TotalTrades[1] and
(IsExitName("즉시손절1",1) == true or IsExitName("본전청산1",1)) then
Cond2 = false;
Cond1 = RSIv < RSI매수값 and Simri < 심리도값 and RSIVV < A and RSIVV > B and v > 거래량1 and v < 거래량2 ;
if bdate != bdate[1] Then
{
DD = DD+1;
if v2 > 0 and DD == v2+초기화 Then
BuySetup = false;
}
if BuySetup == false and Cond1 == true and Cond1[1] == false Then
{
v1 = data1(C);
v2 = DD;
BuySetup = true;
}
if Cond2 == true and MarketPosition == 0 and BuySetup == true and data1(C < O) and entry == 0 and data2(c>sarv) Then
buy("매수",AtLimit,v1-PriceScale*하락틱수);
즐거운 하루되세요
> 이형지 님이 쓴 글입니다.
> 제목 : 재차 질문 드림니다..
> 전에 질문에서 분봉 기준의 수식에서 파라볼릭 일봉 기준으로 반영을 요청하였는데
수식이 복잡하다고 하셔서요
혹시 위 그림과 같이 파라볼릭 일봉을 data2 형식의 방법으로 구현하면 가능할까요??
아래수식 + data2(일봉)의 파라볼릭 매수환경시 --> 매수 진입
========================================================
Input : RSIPeriod(7),RSI매수값(30),SimPeriod(7),심리도값(24);
Input : N1(1),초기화(7);
Input : CCI기간(20),CCI값(300),CCI값1(180);
Input : 하락틱수(15);
Input : 즉시익절1(150),즉시손절1(75);
Input : 분할매수횟수(1),분할매수틱수(50);
Input : RSIPeriod1(8),A(15),B(0);
Input : N2(0.6),N3(0.02);
Input : tr수익(100),tr하락(125);
Input : 거래량1(1600),거래량2(16000);
Input : 저점손절틱수(20);
Input : N4(0.85),N5(0.85);
Input : 본전생각틱(70);
input : P(20),dv(4.5);
var : BBup(0);
BBup = BollBandUp(P,dv);
var : cnt(0),SigSum(0),count2(0),RSIsig(0);
Var : Counter(0), DownAmt(0), UpAmt(0), UpSum(0), DownSum(0), UpAvg(0), DownAvg(0);
var : idx(0), PreUpAvg(0), preDownAvg(0),RSIVv(0);
Array : C1[100](0);
var : CCIv(0),RSIv(0),Simri(0),BuySetup(false),DD(0),entry(0);
CCIv = CCI(CCI기간);
RSIV = RSI(RSIPeriod);
Simri = Simrido(SimPeriod);
if Bdate != Bdate[1] Then
{
for cnt = 1 to 99
{
C1[cnt] = C1[cnt-1][1];
}
PreUpAvg = UpAvg[1];
preDownAvg = DownAvg[1];
idx = idx + 1;
}
C1[0] = C;
If idx == RSIPeriod1+2 Then
{
UpSum = 0;
DownSum = 0;
For Counter = 0 To RSIPeriod1 - 1
{
UpAmt = C1[Counter] - C1[Counter+1];
If UpAmt >= 0 Then
DownAmt = 0;
Else
{
DownAmt = -UpAmt;
UpAmt = 0;
}
UpSum = UpSum + UpAmt;
DownSum = DownSum + DownAmt;
}
UpAvg = UpSum / RSIPeriod1;
DownAvg = DownSum / RSIPeriod1;
}
If idx > RSIPeriod1+2 Then
{
UpAmt = C1[0] - C1[1];
If UpAmt >= 0 Then
DownAmt = 0;
Else
{
DownAmt = -UpAmt;
UpAmt = 0;
}
UpAvg = (PreUpAvg * (RSIPeriod1 - 1) + UpAmt) / RSIPeriod1;
DownAvg = (preDownAvg * (RSIPeriod1 - 1) + DownAmt) / RSIPeriod1;
}
If UpAvg + DownAvg <> 0 Then
RSIvv = 100 * UpAvg / (UpAvg + DownAvg);
Else
RSIvv = 0;
if bdate != bdate[1] Then
{
Entry = 0;
Condition2 = true;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
if TotalTrades > TotalTrades[1] and
(IsExitName("즉시손절1",1) == true or IsExitName("본전청산1",1)) then
Condition2 = false;
Condition1 = RSIv < RSI매수값 and Simri < 심리도값 and RSIVV < A and RSIVV > B and v > 거래량1 and v < 거래량2 ;
if bdate != bdate[1] Then
{
DD = DD+1;
if var2 > 0 and DD == var2+초기화 Then
BuySetup = false;
}
if BuySetup == false and Condition1 == true and Condition1[1] == false Then
{
var1 = C;
var2 = DD;
BuySetup = true;
}
if Condition2 == true and MarketPosition == 0 and BuySetup == true and C < O and entry == 0 Then
buy("매수",AtLimit,var1-PriceScale*하락틱수);