예스스탁
예스스탁 답변
2022-05-27 10:49:52
안녕하세요
예스스탁입니다.
Input : shortPeriod(5), longPeriod(20);
value1 = ema(C, shortPeriod);
value2 = ema(C, longPeriod);
If MarketPosition <= 0 and CrossUP(value1, value2) Then
{
Buy("b1",OnClose,Def,2);
Buy("b2.",AtLimit,c-PriceScale*2,2);
Buy("b3.",AtLimit,c-PriceScale*6,2);
ExitLong("bl.",AtStop,C-PriceScale*10);
}
If MarketPosition >= 0 and CrossDown(value1, value2) Then
{
Sell("s1",OnClose,Def,2);
Sell("s2.",AtLimit,c+PriceScale*2,2);
Sell("s3.",AtLimit,c+PriceScale*6,2);
ExitShort("SL,",AtStop,C+PriceScale*10);
}
if MarketPosition == 1 Then
{
if lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*2 Then
Buy("b2",AtLimit,EntryPrice-PriceScale*2);
if lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*6 Then
Buy("b3",AtLimit,EntryPrice-PriceScale*6);
ExitLong("bl",AtStop,EntryPrice-PriceScale*10);
ExitLong("bp1",AtLimit,avgEntryPrice+PriceScale*5,"b1");
ExitLong("bp2",AtLimit,avgEntryPrice+PriceScale*7);
if CurrentContracts < MaxContracts Then
ExitLong("bx",AtStop,AvgEntryPrice);
}
if MarketPosition == -1 Then
{
if highest(L,BarsSinceEntry) < EntryPrice+PriceScale*2 Then
Sell("s2",AtLimit,EntryPrice+PriceScale*2);
if highest(L,BarsSinceEntry) < EntryPrice+PriceScale*6 Then
Sell("s3",AtLimit,EntryPrice+PriceScale*6);
ExitShort("sl",AtStop,EntryPrice+PriceScale*10);
ExitShort("sp1",AtLimit,avgEntryPrice-PriceScale*5,"s1");
ExitShort("sp2",AtLimit,avgEntryPrice-PriceScale*7);
if CurrentContracts < MaxContracts Then
ExitShort("sx",AtStop,AvgEntryPrice);
}
즐거운 하루되세요
> thdgus1s 님이 쓴 글입니다.
> 제목 : 안녕하세요^^ 문의드립니다
> 안녕하세요~^^
첨부파일 에서 추가식 부탁드립니다
* 매수신호나오면~
1) 매수신호가격에 2계약진입
2) 매수신호가격 -4틱값에 2계약진입
3) 매수신호가격 -6틱값에 2계약진입
* 진입되면(합=2계약~6계약) ~
* 1차청산=평균진입가격에서~+5틱수익으로가면 1차청산(2계약청산)
* 1차청산됐는데도 계약수가 남았다면~
* 2차청산=평균진입가격에서~수익으로 +7틱가면 남은물량 모두 2차청산(완청)
** 1차청산+5틱에된후~2차청산이 안되고 밀리면~나머지는 본청(진입가격에 청산)
4) 손절= 진입평균값에서~-10틱에 손절
* 매도 신호도 매수신호와 동일하게 부탁드립니다