예스스탁
예스스탁 답변
2020-02-28 10:29:01
안녕하세요
예스스탁입니다.
input : B1(49.50),B2(49.00),S1(50.50),S2(51),EntryVol(2);
input : Profit1(20),Profit2(40),Loss(20),tr(20);
if MarketPosition <= 0 and L > B1 Then
buy("b1",atlimit,B2,EntryVol);
if MarketPosition <= 0 and L > B2 Then
buy("b2",atlimit,B2,EntryVol);
if MarketPosition >= 0 and H < S1 Then
sell("s1",atlimit,S1,EntryVol);
if MarketPosition >= 0 and L > S2 Then
sell("s2",atlimit,S2,EntryVol);
if MarketPosition == 1 then
{
ExitLong("bp1",atlimit,EntryPrice+PriceScale*Profit1,"",1,1);
ExitLong("bp2",atlimit,EntryPrice+PriceScale*Profit2,"",1,1);
ExitLong("bl",AtStop,EntryPrice-PriceScale*loss);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*profit1 Then
ExitLong("btr",AtStop,highest(H,BarsSinceEntry)-PriceScale*tr);
}
if MarketPosition == -1 then
{
ExitShort("sp1",atlimit,EntryPrice-PriceScale*Profit1,"",1,1);
ExitShort("sp2",atlimit,EntryPrice-PriceScale*Profit2,"",1,1);
ExitShort("sl",AtStop,EntryPrice+PriceScale*loss);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*profit1 Then
ExitShort("str",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*tr);
}
즐거운 하루되세요
> eiger 님이 쓴 글입니다.
> 제목 : 수식 요청드립니다.
> 안녕하세요. 아래조건으로 수식 작성 요청드립니다.
1) 매수진입 조건 ㅡ 현재가격(예 50.00) 아래에 있는 직접 입력한 A가격(예시 49.50)에서 첫번째 터치시 매수
매수 청산후 두번째 진입은 직접 입력한 B가격(예시 49.00)에서 첫번째 터치시 매수
2) 매도진입 조건 ㅡ 현재가격(예 50.00) 위에 있는 직접 입력한 C가격(예시 50.50)에서 첫번째 터치시 매도
매도 청산후 두번째 진입은 직접 입력한 D가격(예시 51.00)에서 첫번째 터치시 매도
3) 매수청산 조건 ㅡ 2계약 진입후 첫번째 계약은 20틱 청산. 두번째 계약은 40틱 청산
4) 매도청산 조건 ㅡ 2계약 진입후 첫번째 계약은 20틱 청산. 두번째 계약은 40틱 청산
5) 익절 조건 ㅡ 매수/매도 청산 조건과 동일
6) 손절 조건 ㅡ 기본 20틱. 매수진입후 1차 20틱 청산후 매수 진입후 최고가 대비 20틱 하락시 청산.
매도진입후 1차 20틱 청산후 매도 진입후 최저가 대비 20틱 상승시 청산.
7) 기타 ㅡ A.B.C.D가격은 직접 입력
위 조건으로 수식 작성 부탁드립니다.
감사합니다.