커뮤니티
수식문의
2015-10-02 05:33:12
155
글번호 90876
아래의수식1,2 을 시스템으로 바꾸어주세요 2개 수식 전부 색이 바꾸어질때 매수도로부탁합니다 감사합니다
1,
input : period(1);
var : haClose(0), haOpen(0), haHigh(0), haLow(0);
if CurrentBar > 1 then {
haClose = (Open+High+Low+Close)/4;
haOpen = (haOpen[1] + haClose[1])/2 ;
haHigh = Max(High, haOpen, haClose);
haLow = Min(Low, haOpen, haClose) ;
}
if CurrentBar > 20 then {
if ma(haClose,period) > ma(haOpen,period) Then{
plot1((haHigh-haClose)+ma(haClose,period),"TailUp",RED);
plot2(ma(haClose,period),"BodyUP",RED);
plot3(ma(haOpen,period)-PriceScale/2 ,"BodyDelete",GREEN);
plot4(ma(haOpen,period),"tailDown",RED);
plot5(ma(haOpen,period)-(haOpen-haLow)-PriceScale/2,"TailDelete",GREEN);
}
else {
plot1((haHigh-haOpen)+ma(haOpen,period),"TailUp",BLACK);
plot2(ma(haOpen,period),"BodyUP",BLACK);
plot3(ma(haClose,period)-PriceScale/2,"BodyDelete",GRAY);
plot4(ma(haClose,period),"tailDown",BLACK);
plot5(ma(haClose,period)-(haClose-haLow)-PriceScale/2,"TailDelete",GRAY);
}
}
2
Input : Period(14);
var : TSF(0);
TSF = LRL(C,Period)+LRS(C,Period);
if TSF > TSF[1] Then
plot1(TSF, "이평", green);
Else if TSF < TSF[1] Then
plot1(TSF, "이평", gray );
첨부사항인데요 위의두식이 합성일때 색상이 같을때만 매수도도 가능하면 부탁드립니다
답변 1
예스스탁 예스스탁 답변
2015-10-02 11:53:43
안녕하세요
예스스탁입니다.
1
input : period(1);
var : haClose(0), haOpen(0), haHigh(0), haLow(0);
if CurrentBar > 1 then {
haClose = (Open+High+Low+Close)/4;
haOpen = (haOpen[1] + haClose[1])/2 ;
haHigh = Max(High, haOpen, haClose);
haLow = Min(Low, haOpen, haClose) ;
}
if CurrentBar > 20 then {
if ma(haClose,period) > ma(haOpen,period) Then{
buy();
}
else {
sell();
}
}
2.
Input : Period(14);
var : TSF(0);
TSF = LRL(C,Period)+LRS(C,Period);
if TSF > TSF[1] Then
buy();
Else if TSF < TSF[1] Then
sell();
3.
input : period(1);
Input : TSFPeriod(14);
var : haClose(0), haOpen(0), haHigh(0), haLow(0);
var : TSF(0),T1(0),T2(0);
TSF = LRL(C,TSFPeriod)+LRS(C,TSFPeriod);
if CurrentBar > 1 then {
haClose = (Open+High+Low+Close)/4;
haOpen = (haOpen[1] + haClose[1])/2 ;
haHigh = Max(High, haOpen, haClose);
haLow = Min(Low, haOpen, haClose) ;
}
if CurrentBar > 20 then {
if ma(haClose,period) > ma(haOpen,period) Then{
T1 = 1;
}
else {
T1 = -1;
}
}
if TSF > TSF[1] Then
T2 = 1;
Else if TSF < TSF[1] Then
T2 = -1;
Condition1 = T1 == 1 and T2 == 1;
Condition2 = T1 == -1 and T2 == -1;
if Condition1 == true and Condition1[1] == false Then
buy();
if Condition2 == true and Condition2[1] == false Then
sell();
즐거운 하루되세요
> 백진강 님이 쓴 글입니다.
> 제목 : 수식문의
> 아래의수식1,2 을 시스템으로 바꾸어주세요 2개 수식 전부 색이 바꾸어질때 매수도로부탁합니다 감사합니다
1,
input : period(1);
var : haClose(0), haOpen(0), haHigh(0), haLow(0);
if CurrentBar > 1 then {
haClose = (Open+High+Low+Close)/4;
haOpen = (haOpen[1] + haClose[1])/2 ;
haHigh = Max(High, haOpen, haClose);
haLow = Min(Low, haOpen, haClose) ;
}
if CurrentBar > 20 then {
if ma(haClose,period) > ma(haOpen,period) Then{
plot1((haHigh-haClose)+ma(haClose,period),"TailUp",RED);
plot2(ma(haClose,period),"BodyUP",RED);
plot3(ma(haOpen,period)-PriceScale/2 ,"BodyDelete",GREEN);
plot4(ma(haOpen,period),"tailDown",RED);
plot5(ma(haOpen,period)-(haOpen-haLow)-PriceScale/2,"TailDelete",GREEN);
}
else {
plot1((haHigh-haOpen)+ma(haOpen,period),"TailUp",BLACK);
plot2(ma(haOpen,period),"BodyUP",BLACK);
plot3(ma(haClose,period)-PriceScale/2,"BodyDelete",GRAY);
plot4(ma(haClose,period),"tailDown",BLACK);
plot5(ma(haClose,period)-(haClose-haLow)-PriceScale/2,"TailDelete",GRAY);
}
}
2
Input : Period(14);
var : TSF(0);
TSF = LRL(C,Period)+LRS(C,Period);
if TSF > TSF[1] Then
plot1(TSF, "이평", green);
Else if TSF < TSF[1] Then
plot1(TSF, "이평", gray );
첨부사항인데요 위의두식이 합성일때 색상이 같을때만 매수도도 가능하면 부탁드립니다
다음글
이전글