10분봉에서 연속 양봉이 나오면 매수 연속음봉이 나오면 매도
매매시간은 오후3시부터 새벽5시까지로 한정하고요.
매매횟수를 5번으로(이 횟수는 변수 처리해 주시고요.)
익절은 50틱 손절 50틱 (이것도 변수 처리해 주세요.)
감사합니다.
답변 1
예스스탁
예스스탁 답변
2021-03-09 17:22:50
안녕하세요
예스스탁입니다.
input : StartTime(150000),EndTime(050000);
input : N(2);
input : 익절틱수(50),손절틱수(50),진입횟수(5);
var : Tcond(false),entry(0);
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
entry = 0;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if Tcond == true and entry < 진입횟수 Then
{
if MarketPosition <= 0 and CountIf(C>O,N) == N Then
Buy();
if MarketPosition >= 0 and CountIf(C<O,N) == N Then
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 디엠 님이 쓴 글입니다.
> 제목 : 시스템식 문의 드립니다.
> 10분봉에서 연속 양봉이 나오면 매수 연속음봉이 나오면 매도
매매시간은 오후3시부터 새벽5시까지로 한정하고요.
매매횟수를 5번으로(이 횟수는 변수 처리해 주시고요.)
익절은 50틱 손절 50틱 (이것도 변수 처리해 주세요.)
감사합니다.