예스스탁
예스스탁 답변
2022-11-09 13:47:33
안녕하세요
예스스탁입니다.
var1 = ma(C,10);
Var2 = ma(C,20);
if MarketPosition <= 0 and CrossUp(var1,Var2) Then
Buy("b",OnClose,Def,2);
if MarketPosition >= 0 and CrossDown(var1,Var2) Then
Sell("s",OnClose,Def,2);
if MarketPosition == 1 Then
{
ExitLong("Bp1",AtLimit,EntryPrice*1.02,"",1,1);
ExitLong("Bp2",AtLimit,EntryPrice*1.03,"",1,1);
if CurrentContracts == MaxContracts Then
ExitLong("bl1",AtStop,EntryPrice*0.99);
Else
ExitLong("bl2",AtStop,EntryPrice);
}
if MarketPosition == -1 Then
{
ExitShort("Sp1",AtLimit,EntryPrice*0.98,"",1,1);
ExitShort("Sp2",AtLimit,EntryPrice*0.97,"",1,1);
if CurrentContracts == MaxContracts Then
ExitShort("sl1",AtStop,EntryPrice*1.01);
Else
ExitShort("sl2",AtStop,EntryPrice);
}
즐거운 하루되세요
> 마식 님이 쓴 글입니다.
> 제목 : 수식 부탁드립니다.
>
1. 이평선 10일 선이 20일선 크로스업 매수 2계약
2. 손절선 1% 하락시 2계약 손절
3. 익절 3%로 설정
4. 2% 상승시 1계약 익절
5. 4번 성립시 2번 손절선을 진입값으로 돌아왔을시 손절
--------------------------------------------------
1-1. 매도도 똑같은 방식으로 적용 부탁드립니다. 20일 10일 하락 시
고맙습니다