예스스탁
예스스탁 답변
2023-12-19 15:13:34
안녕하세요
예스스탁입니다.
input : StartTime(210000);
var : Tcond(false),entry(0);
if bdate != Bdate[1] Then
{
Tcond = False;
entry = 0;
}
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if Tcond == true Then
{
if MarketPosition == 0 and entry < 1 Then
{
Buy("b",AtStop,DayOpen+PriceScale*200,3);
Sell("s",AtStop,DayOpen-PriceScale*200,3);
}
}
if MarketPosition == 1 Then
{
ExitLong("bx1",AtLimit,EntryPrice+PriceScale*300,"",1,1);
ExitLong("bx2",AtLimit,EntryPrice+PriceScale*400,"",1,1);
ExitLong("bx3",AtLimit,EntryPrice+PriceScale*500,"",1,1);
}
if MarketPosition == -1 Then
{
ExitShort("sx1",AtLimit,EntryPrice-PriceScale*300,"",1,1);
ExitShort("sx2",AtLimit,EntryPrice-PriceScale*400,"",1,1);
ExitShort("sx3",AtLimit,EntryPrice-PriceScale*500,"",1,1);
}
즐거운 하루되세요
> 신나는파파 님이 쓴 글입니다.
> 제목 : 시스템식 부탁드립니다.
> > 진입조건:
조건1: 매수가 먼저든, 매도가 먼저든 1번만 적용.
조건2: 21시 이후에 발생한 조건일 것.
매수1 : 시가대비 +200틱(stop),3계약
매도1 : 시가대비 -200틱(stop),3계약
손절: 200틱(일괄청산)
익절1 : 300틱(1계약)
익절2: 400틱(1계약)
익절3: 500틱(1계약)
매수든, 매도든 1일 1회만 진입하고 싶습니다.
부탁드리겠습니다.