예스스탁
예스스탁 답변
2021-04-05 14:15:58
안녕하세요
예스스탁입니다.
1
input : Per1(10),Per2(25);
var : BH(0),SL(0);
if MarketPosition == 1 Then
{
BH = highest(H,BarsSinceEntry);
if BH >= EntryPrice+PriceScale*65 Then
ExitLong("bx1",AtStop,BH-(BH-EntryPrice)*(Per1/100),"",1,1);
if BH >= EntryPrice+PriceScale*185 Then
ExitLong("bx2",AtStop,BH-(BH-EntryPrice)*(Per2/100),"",1,1);
}
if MarketPosition == -1 Then
{
SL = Lowest(L,BarsSinceEntry);
if SL <= EntryPrice-PriceScale*65 Then
ExitShort("sx1",AtStop,SL+(EntryPrice-SL)*(Per1/100),"",1,1);
if BH >= EntryPrice+PriceScale*185 Then
ExitShort("sx2",AtStop,SL+(EntryPrice-SL)*(Per2/100),"",1,1);
}
2
input : tick1(10),Tick2(25);
var : BH(0),SL(0);
if MarketPosition == 1 Then
{
BH = highest(H,BarsSinceEntry);
if BH >= EntryPrice+PriceScale*65 Then
ExitLong("bx1",AtStop,BH-Tick1*PriceScale,"",1,1);
if BH >= EntryPrice+PriceScale*185 Then
ExitLong("bx2",AtStop,BH-Tick2*PriceScale,"",1,1);
}
if MarketPosition == -1 Then
{
SL = Lowest(L,BarsSinceEntry);
if SL <= EntryPrice-PriceScale*65 Then
ExitShort("sx1",AtStop,SL+Tick1*PriceScale,"",1,1);
if BH >= EntryPrice+PriceScale*185 Then
ExitShort("sx2",AtStop,SL+Tick2*PriceScale,"",1,1);
}
즐거운 하루되세요
> 고르면상한가 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 기본적으로는 2계약씩 진입을 하는 기준에서 설명 부탁드립니다.
Buy("매도", DEF, DEF, 2);
Sell("매도", DEF, DEF, 2);
라고 되었을때 청산 전략을 아래와 같이 가져가고 싶습니다.
1 계약의 경우 65틱 목표 수익 이후부터 트레일링스탑이 가동되고, 최고 수익 목표대비 10% 하락시 청산(%가 아닌 틱으로 설정할 수 있는 옵션도 같이 제공부탁드립니다.)
나머지 잔여 1계약의 경우 185틱 목표 수익 이후부터 트레일링 스탑이 가동되고, 최고 수익 목표대비 25% 하락시 청산(%가 아닌 틱으로 설정할 수 있는 옵션도 같이 제공부탁드립니다.)