답변완료
수식신호부탁드립니다
Input : shortPeriod(5), longPeriod(60);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
# 매수/매도청산
If CrossUP(value1, value2) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value1, value2) Then
{
Sell();
}
----------------------
이동평균(단순) Golden_Dead 입니다.
보시는 그래프는 신호가 매수 매도로 반복후 한 방향으로 수렴한 패턴입니다.
부탁할 수식어는
단순이평 (5,60)에서 07:00~22:00 사이의 신호가 매도4회 매수5회후
이격도 69의 기준선이 100 이상일때 매수후 익일 05:50분 청산하는 내용 입니다.
2020-03-27
571
글번호 137269
시스템
답변완료
기존 수식에 파라볼릭 수식(일봉기준)을 반영하게 부탁드려요
기존 수식에 파라볼릭 수식(일봉기준)을 반영하게 부탁드려요
기존 수식은 30분봉 기준의 수식입니다.
이수식에 파라볼릭 수식(일봉기준)으로 파라볼릭 매수 방향일때 기존수식에 반영될수 있게 도와주세요
정리
파라볼릭(일봉기준) 매수 방향 + 기존 매수 조건 수식 교집합시 매수 진입
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*하락틱수);
2020-03-27
552
글번호 137264
시스템