커뮤니티
아래식에서
2017-05-27 10:13:39
100
글번호 109891
아래식에서당일총손실이60틱을초과하면 매매정지하고 진입금지하는식 추가바람니다''
Input : Period(200), Period1(100);
Var : value(0);
value = StochasticsK(Period,Period1);
var : HH(0),LL(0);
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if count < 30 Then{
if stime >= 210000 or stime < 030000 Then{
# 매수/매도청산
If CrossUP(value,52) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value,48) Then
{
Sell();
}
}
}
SetStopLoss(PriceScale*40,PointStop);
SetStopProfittarget(PriceScale*150,PointStop);
답변 1
예스스탁 예스스탁 답변
2017-05-29 18:01:09
안녕하세요
예스스탁입니다.
Input : 시작시간(210000),종료시간(30000),Period(200), Period1(100),당일총손실틱수(60);
Var : value(0),당일손실(0);
var : HH(0),LL(0),N1(0),T1(0),daypl(0);
var : cnt(0),count(0),TCond(false),Xcond(false);
value = StochasticsK(Period,Period1);
당일손실 = PriceScale*당일총손실틱수;
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Tcond = true;
Xcond = false;
N1 = NetProfit;
T1 = TotalTrades;
}
if stime == 종료시간 or (stime > 종료시간 and stime[1] < 종료시간) Then
tcond = false;
if TotalTrades > TotalTrades[1] and (IsExitName("bdl",1) or IsExitName("sdl",1)) Then
Xcond = true;
if MarketPosition == 0 Then
count = TotalTrades-T1;
Else
count = TotalTrades-T1+1;
dayPL = NetProfit-T1;
if count < 30 and tcond == true and Xcond == false Then{
# 매수/매도청산
If CrossUP(value,52) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value,48) Then
{
Sell();
}
if MarketPosition == 1 Then
exitlong("bdl",AtStop,EntryPrice-당일손실-daypl);
if MarketPosition == -1 Then
ExitShort("sdl",AtStop,EntryPrice+당일손실+daypl);
}
SetStopLoss(PriceScale*40,PointStop);
SetStopProfittarget(PriceScale*150,PointStop);
즐거운 하루되세요
> 수원 님이 쓴 글입니다.
> 제목 : 아래식에서
>
아래식에서당일총손실이60틱을초과하면 매매정지하고 진입금지하는식 추가바람니다''
Input : Period(200), Period1(100);
Var : value(0);
value = StochasticsK(Period,Period1);
var : HH(0),LL(0);
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if count < 30 Then{
if stime >= 210000 or stime < 030000 Then{
# 매수/매도청산
If CrossUP(value,52) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value,48) Then
{
Sell();
}
}
}
SetStopLoss(PriceScale*40,PointStop);
SetStopProfittarget(PriceScale*150,PointStop);
다음글
이전글