커뮤니티
글번호47445재질문
2016-04-28 00:30:23
124
글번호 97533
안녕하세요?
글번호 47445번 재질문입니다.
아래의 식에다가도 똑같은 식을 적용 부탁드립니다.
input : xtime(60000);
var : tcond(false),cond1(false),cond2(false);
if stime == xtime or (stime > xtime and stime[1] < Xtime) Then{
Tcond = false;
}
if bdate != bdate[1] Then{
Tcond = true;
Condition1 = false;
Condition2 = false;
}
var1 = ma(c,5);
var2 = ma(c,20);
cond1 = C > var1 and var1 > var2;
cond2 = C < var1 and var1 < var2;
if cond1 == true and cond1[1] == false then
Condition1 = true;
if cond2 == true and cond2[1] == false then
Condition2 = true;
if Tcond == true And
Condition1 == true and cond1 == true and
var1 > var1[1] and var2 > var2[1] Then
SELL("S");
if Tcond == true And
Condition2 == true and Cond2 == true and
var1 < var1[1] and var2 < var2[1] Then
BUY("B");
SetStopLoss(1,PercentStop);
SetStopProfittarget(3.2,PercentStop);
답변 1
예스스탁 예스스탁 답변
2016-05-02 10:56:00
안녕하세요
예스스탁입니다.
input : xtime(60000);
var : tcond(false),cond1(false),cond2(false),T(0);
if stime == xtime or (stime > xtime and stime[1] < Xtime) Then{
Tcond = false;
}
if bdate != bdate[1] Then{
Tcond = true;
Condition1 = false;
Condition2 = false;
T = 1;
}
if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then{
if T == 1 Then
T = -1;
Else
T = 1;
}
var1 = ma(c,5);
var2 = ma(c,20);
cond1 = C > var1 and var1 > var2;
cond2 = C < var1 and var1 < var2;
if cond1 == true and cond1[1] == false then
Condition1 = true;
if cond2 == true and cond2[1] == false then
Condition2 = true;
if Tcond == true And
Condition1 == true and cond1 == true and
var1 > var1[1] and var2 > var2[1] Then{
if T == 1 then
SELL();
Else
buy();
}
if Tcond == true And
Condition2 == true and Cond2 == true and
var1 < var1[1] and var2 < var2[1] Then{
if T == 1 Then
buy();
Else
sell();
}
SetStopLoss(1,PercentStop);
SetStopProfittarget(3.2,PercentStop);
즐거운 하루되세요
> 통큰베팅 님이 쓴 글입니다.
> 제목 : 글번호47445재질문
> 안녕하세요?
글번호 47445번 재질문입니다.
아래의 식에다가도 똑같은 식을 적용 부탁드립니다.
input : xtime(60000);
var : tcond(false),cond1(false),cond2(false);
if stime == xtime or (stime > xtime and stime[1] < Xtime) Then{
Tcond = false;
}
if bdate != bdate[1] Then{
Tcond = true;
Condition1 = false;
Condition2 = false;
}
var1 = ma(c,5);
var2 = ma(c,20);
cond1 = C > var1 and var1 > var2;
cond2 = C < var1 and var1 < var2;
if cond1 == true and cond1[1] == false then
Condition1 = true;
if cond2 == true and cond2[1] == false then
Condition2 = true;
if Tcond == true And
Condition1 == true and cond1 == true and
var1 > var1[1] and var2 > var2[1] Then
SELL("S");
if Tcond == true And
Condition2 == true and Cond2 == true and
var1 < var1[1] and var2 < var2[1] Then
BUY("B");
SetStopLoss(1,PercentStop);
SetStopProfittarget(3.2,PercentStop);
다음글
이전글