예스스탁
예스스탁 답변
2023-07-03 09:30:26
안녕하세요
예스스탁입니다.
1
input : P1(5),P2(10),P3(20);
input : short1(12),long1(24),sig1(9);
input : evPeriod(15),Per(15);
var : mav1(0),mav2(0),mav3(0);
var : macdv1(0),macds1(0);
var : evup(0),evdn(0);
mav1 = ma(C,P1);
mav2 = ma(C,P2);
mav3 = ma(C,P3);
macdv1 = macd(short1,long1);
macds1 = Ema(macdv1,sig1);
evup = EnvelopeUp(evPeriod,Per);
evdn = EnvelopeDown(evPeriod,Per);
if MarketPosition <= 0 and CrossUp(macdv1,0) Then
Buy("b");
if MarketPosition == 1 Then
{
if mav3 > mav2 and mav2 > mav1 Then
{
ExitLong("bx1",AtLimit,EntryPrice*1.10);
}
if mav3 > mav1 and mav1 > mav2 Then
{
ExitLong("bx2",AtLimit,EntryPrice*1.20);
}
if mav1 > mav3 and mav3 > mav1 Then
{
ExitLong("bx3",AtLimit,EntryPrice*1.30);
}
if mav1 < mav2 and mav2 < mav3 Then
{
ExitLong("bx4",AtLimit,evup*1.20);
}
}
if MarketPosition == 0 and CountIf(macdv1<0,BarsSinceExit(1)) < 1 Then
{
if IsExitName("bx1",1) == true Then
Buy("b1",AtLimit,EntryPrice(1)*0.98);
if IsExitName("bx2",1) == true Then
Buy("b2",AtLimit,EntryPrice(1)*0.98);
if IsExitName("bx3",1) == true Then
Buy("b3",AtLimit,ExitPrice(1)*0.85);
}
2
input : P1(5),P2(10),P3(20);
input : short1(12),long1(24),sig1(9);
input : short2(10),long2(20),sig2(7);
input : evPeriod(15),Per(15);
var : mav1(0),mav2(0),mav3(0);
var : macdv1(0),macds1(0);
var : macdv2(0),macds2(0);
var : evup(0),evdn(0);
mav1 = ma(C,P1);
mav2 = ma(C,P2);
mav3 = ma(C,P3);
macdv1 = macd(short1,long1);
macds1 = Ema(macdv1,sig1);
macdv2 = macd(short2,long2);
macds2 = Ema(macdv2,sig2);
evup = EnvelopeUp(evPeriod,Per);
evdn = EnvelopeDown(evPeriod,Per);
if MarketPosition <= 0 and CrossUp(macdv1,0) Then
Buy("b");
if MarketPosition == 1 Then
{
if mav3 > mav2 and mav2 > mav1 and c >= EntryPrice*1.10 and CrossDown(macdv2,0) Then
{
ExitLong("bx1");
}
if mav3 > mav1 and mav1 > mav2 and C >= EntryPrice*1.20 and CrossDown(macdv2,0) Then
{
ExitLong("bx2");
}
if mav1 > mav3 and mav3 > mav1 and C >= EntryPrice*1.30 and CrossDown(macdv2,0) Then
{
ExitLong("bx3");
}
if mav1 < mav2 and mav2 < mav3 Then
{
ExitLong("bx4",AtLimit,evup*1.20);
}
}
즐거운 하루되세요
> 탱탱볼 님이 쓴 글입니다.
> 제목 : 수식 문의드립니다
> 1번
이평선 5.10.20
macd 12.24.9
엔벨로프 15.15
크로스업(macd,0) 매수
20> 10> 5 일때 10% 상승시 매도(단, 10%수익 이후 macd >0 유지될때 직전매수가에서 -2%시 재매수, macd가 기준선을 이탈시 무효)
20> 5> 10 일때 20% 상승시 매도(단, 20%수익 이후 macd >0 유지될때 직전매수가에서 -2%시 재매수, macd가 기준선을 이탈시 무효)
5> 20> 10 일때 30% 상승시 매도(단, 30%수익 이후 하락하여 매도가보다 -15%시 재매수, macd가 기준선을 이탈시 무효)
5< 10< 20 일때 캔들이 엔벨로프 상단을 크로스업하고 상단에서 20%이상 상승하면 즉시매도
2번
이평선 5.10.20
macd1 12.24.9
macd2 10.20.7
엔벨로프 15.15
크로스업(macd1,0) 매수
20> 10> 5 일때 10%이상 상승시 크로스다운(macd2,0) 매도
20> 5> 10 일때 20%이상 상승시 크로스다운(macd2,0) 매도
5> 20> 10 일때 30%이상 상승시 크로스다운(macd2,0) 매도
단, 캔들이 엔벨로프 상단을 크로스업하고 상단에서 20%이상 상승하면 즉시매도
감사합니다.