커뮤니티
재문의드립니다.
2017-07-03 16:38:34
109
글번호 110947
input : P(14),Per(100);
var : Tcond(false);
if stime == 070000 or (stime > 070000 and stime[1] < 070000) Then
Tcond = true;
if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{
Tcond = false;
if MarketPosition == 1 Then
ExitLong();
if MarketPosition == -1 Then
ExitShort();
}
var1 = RSI(P);
if Tcond == true then{
if crossup(var1,70) and V >= V[1]*(1+Per/100) Then
buy("b");
if MarketPosition == 1 Then
exitlong("bx",AtStop,daylow[BarsSinceEntry]-PriceScale*5);
if CrossDown(var1,30) and V >= V[1]*(1+Per/100) Then
sell("s");
if MarketPosition == -1 Then
ExitShort("sx",AtStop,DayHigh[BarsSinceEntry]+PriceScale*5);
}
여기에서 하루시간내에 10틱 익절 4번 하면 거래 완전종료를 넣어주세요.
그럼 부탁드리겠습니다. 수고하세요.
답변 1
예스스탁 예스스탁 답변
2017-07-03 17:52:58
안녕하세요
예스스탁입니다.
input : P(14),Per(100);
var : Tcond(false),Xcond(false),Pcnt(0);
if stime == 070000 or (stime > 070000 and stime[1] < 070000) Then{
Tcond = true;
Xcond = false;
Pcnt = 0;
}
if TotalTrades > TotalTrades[1] and IsExitName("StopProfitTarget",1) == true Then{
Pcnt = Pcnt+1;
if Pcnt == 4 Then
Xcond = true;
}
if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{
Tcond = false;
if MarketPosition == 1 Then
ExitLong();
if MarketPosition == -1 Then
ExitShort();
}
var1 = RSI(P);
if Tcond == true and Xcond == false then{
if crossup(var1,70) and V >= V[1]*(1+Per/100) Then
buy("b");
if MarketPosition == 1 Then
exitlong("bx",AtStop,daylow[BarsSinceEntry]-PriceScale*5);
if CrossDown(var1,30) and V >= V[1]*(1+Per/100) Then
sell("s");
if MarketPosition == -1 Then
ExitShort("sx",AtStop,DayHigh[BarsSinceEntry]+PriceScale*5);
}
SetStopProfittarget(PriceScale*10,PointStop);
즐거운 하루되세요
> 아침한때비51 님이 쓴 글입니다.
> 제목 : 재문의드립니다.
> input : P(14),Per(100);
var : Tcond(false);
if stime == 070000 or (stime > 070000 and stime[1] < 070000) Then
Tcond = true;
if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{
Tcond = false;
if MarketPosition == 1 Then
ExitLong();
if MarketPosition == -1 Then
ExitShort();
}
var1 = RSI(P);
if Tcond == true then{
if crossup(var1,70) and V >= V[1]*(1+Per/100) Then
buy("b");
if MarketPosition == 1 Then
exitlong("bx",AtStop,daylow[BarsSinceEntry]-PriceScale*5);
if CrossDown(var1,30) and V >= V[1]*(1+Per/100) Then
sell("s");
if MarketPosition == -1 Then
ExitShort("sx",AtStop,DayHigh[BarsSinceEntry]+PriceScale*5);
}
여기에서 하루시간내에 10틱 익절 4번 하면 거래 완전종료를 넣어주세요.
그럼 부탁드리겠습니다. 수고하세요.
다음글
이전글