수고많으십니다.
5, 20이평 골든/데드크로스 매매에 있어
골든크로스가 발생해 매수진입한 후 30틱 이상 상승하고나서 되밀려 진입가에서 5틱이상
마이너스가 되면 청산 ==> 청산된 후 반등해 진입가를 기준으로 5틱 이상 플러스되면
골든크로스가 안되어도 다시 매수 진입신호가 나오게 부탁드립니다.
★ 이때 처음 매수 진입신호가 나온후 20봉 이내에서만 위의 재진입 조건이 적용되게 부탁드립니다 ★
(데드크로스는 그 반대입니다)
답변 1
예스스탁
예스스탁 답변
2024-07-10 16:32:20
안녕하세요
예스스탁입니다.
var1 = ma(C,5);
Var2 = ma(C,20);
if MarketPosition <= 0 and CrossUp(var1,Var2) Then
Buy("b");
if MarketPosition >= 0 and CrossDown(var1,Var2) Then
Sell("s");
if MarketPosition == 1 and IsEntryName("b") == true Then
{
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*30 Then
ExitLong("bx",AtStop,EntryPrice-PriceScale*5);
}
if MarketPosition == 0 and MarketPosition(1) == 1 and BarsSinceEntry(1) < 20 and
IsEntryName("b",1) == true and IsExitName("bx1",1) == true Then
Buy("bb",AtStop,EntryPrice(1)+PriceScale*5);
if MarketPosition == -1 and IsEntryName("s") == true Then
{
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*30 Then
ExitShort("sx",AtStop,EntryPrice+PriceScale*5);
}
if MarketPosition == 0 and MarketPosition(1) == -1 and BarsSinceEntry(1) < 20 and
IsEntryName("s",1) == true and IsExitName("sx1",1) == true Then
Sell("ss",AtStop,EntryPrice(1)-PriceScale*5);
즐거운 하루되세요
> 카르마다 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 수고많으십니다.
5, 20이평 골든/데드크로스 매매에 있어
골든크로스가 발생해 매수진입한 후 30틱 이상 상승하고나서 되밀려 진입가에서 5틱이상
마이너스가 되면 청산 ==> 청산된 후 반등해 진입가를 기준으로 5틱 이상 플러스되면
골든크로스가 안되어도 다시 매수 진입신호가 나오게 부탁드립니다.
★ 이때 처음 매수 진입신호가 나온후 20봉 이내에서만 위의 재진입 조건이 적용되게 부탁드립니다 ★
(데드크로스는 그 반대입니다)