예스스탁
예스스탁 답변
2021-04-29 16:19:18
안녕하세요
예스스탁입니다.
input : 틱1(30),틱2(60),틱3(90),틱4(120),틱5(150);
var : T(0),L1(0),L2(0),H1(0),H2(0);
var : T1(0),T2(0),T3(0),T4(0),T5(0);
var : T11(0),T22(0),T33(0),T44(0),T55(0);
var : BL1(0),SH1(0),entry(0);
if bdate != bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
var1 = ma(C,10);
#--------------------------------------------------- 조건 1 아래로
if T <= 0 and
dayindex > 0
and countif(C<O or (C==O),2) == 2
Then
#-----------------------------------------------------조건 1 위로
{
T = 1;
H1 = H;
H2 = H1[1];
if entry < 1 Then
Sell("매도1");
Condition1 = False;
}
#-------------------------------------------------------------- 조건 2 아래로
if T >= 0 and
dayindex > 0
and countif(C>O or (C==O),2) == 2
Then
#--------------------------------------------------------------- 조건 2 위로
{
T = -1;
L1 = L;
L2 = L1[1];
if entry < 1 Then
buy("매수1");
Condition2 = False;
}
if T == 1 Then
{
if H > H1 Then
H1 = H;
if Condition1 == False and entry >= 1 and C < L1 and H1 <= H2 and H2 > 0 Then
{
Condition1 = true;
Sell("매도2");
}
}
if T == -1 Then
{
if L < L1 Then
L1 = L;
if Condition2 == False and entry <= 1 and C > H1 and L1 >= L2 and L2 > 0 Then
{
Condition2 = true;
buy("매수2");
}
}
if MarketPosition == 1 Then
{
if MarketPosition(0)[1] != 1 then
{
BL1 = L1[BarsSinceEntry];
}
Else
{
if T == -1 and T != T[1] and L1 > BL1 then
BL1 = L1;
}
ExitLong("손절 ",AtStop,BL1-PriceScale);
}
if MarketPosition == -1 then
{
if MarketPosition != MarketPosition[1] Then
{
SH1 = H1[BarsSinceEntry];
}
Else
{
if T == 1 and T != T[1] and H1 < SH1 then
SH1 = H1;
}
ExitShort("손절",AtStop,SH1+PriceScale*1);
}
즐거운 하루되세요
> kjdkdh 님이 쓴 글입니다.
> 제목 : 수정좀 부탁드립니다
> input : 틱1(30),틱2(60),틱3(90),틱4(120),틱5(150);
var : T(0),L1(0),L2(0),H1(0),H2(0);
var : T1(0),T2(0),T3(0),T4(0),T5(0);
var : T11(0),T22(0),T33(0),T44(0),T55(0);
var : BL1(0),SH1(0),entry(0);
if bdate != bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
var1 = ma(C,10);
#--------------------------------------------------- 조건 1 아래로
if T <= 0 and
dayindex > 0
and countif(C<O or (C==O),2) == 2
Then
#-----------------------------------------------------조건 1 위로
{
T = 1;
L1 = l;
L2 = L1[1];
if entry < 2 Then
Sell("매도1");
if entry >= 2 and H1 <= H2 and H2 > 0 Then
Sell("매도2");
}
#-------------------------------------------------------------- 조건 2 아래로
if T >= 0 and
dayindex > 0
and countif(C>O or (C==O),2) == 2
Then
#--------------------------------------------------------------- 조건 2 위로
{
T = -1;
H1 = H;
H2 = H1[1];
if entry < 2 Then
buy("매수1");
if entry <= 2 and L1 >= L2 and L2 > 0 Then
buy("매수2");
}
if T == 1 Then
{
if L < L1 Then
L1 = L;
}
if T == -1 Then
{
if H > H1 Then
H1 = H;
}
if MarketPosition == 1 Then
{
if MarketPosition(0)[1] != 1 then
{
BL1 = L1[BarsSinceEntry];
}
Else
{
if T == -1 and T != T[1] and L1 > BL1 then
BL1 = L1;
}
ExitLong("손절 ",AtStop,BL1-PriceScale);
}
if MarketPosition == -1 then
{
if MarketPosition != MarketPosition[1] Then
{
SH1 = H1[BarsSinceEntry];
}
Else
{
if T == 1 and T != T[1] and H1 < SH1 then
SH1 = H1;
}
ExitShort("손절",AtStop,SH1);
}
안녕하세요
위에 식좀 일부 수정좀 부탁합니다
매수 매도 조건 -- 위 식에서 조건1 조건2 에 해당하는 조건이 나오면
매수든 매도든 첫 신호만 들어갑니다 --- 매수 1 매도 1
매수로 진행중에 직전 저점을 이탈하면 청산
매도 조건 -- 조건1 완성되고 직전 조건1의 고점과 현재 조건1 고점과 비교해서
같거나 현재가 낮고
조건2 의 저점을 완성된 봉으로 이탈하면 매도2
매수 조건 -- 조건2 완성되고 직전 조21의 저점과 현재 조건2 저점과 비교해서
같거나 현재가 높고
조건1 의 고점을 완성된 봉으로 돌파하면 매수2
고생좀 해주세요