예스스탁
예스스탁 답변
2020-05-22 10:39:50
안녕하세요
예스스탁입니다.
input : n(1);
var : Pivot(0),R1(0),R2(0),S1(0),S2(0),t(0);
Pivot = (DayHigh(1)+DayLow(1)+DayClose(1))/3;
R1 = 2*Pivot-DayLow(1);
R2 = Pivot+DayHigh(1)-DayLow(1);
S1 = 2*Pivot-DayHigh(1);
S2 = Pivot-DayHigh(1)+DayLow(1);
var1 = (R1+R2)/2;
var2 = (Pivot+R1)/2;
var3 = (Pivot+S1)/2;
var4 = (S1+S2)/2;
if crossup(C,R2+PriceScale*n) Then
T = 9;
if crossup(C,var1+PriceScale*n) Then
T = 8;
if crossup(C,R1+PriceScale*n) Then
T = 7;
if crossup(C,var2+PriceScale*n) Then
T = 6;
if crossup(C,Pivot+PriceScale*n) Then
T = 5;
if crossup(C,var3+PriceScale*n) Then
T = 4;
if crossup(C,S1+PriceScale*n) Then
T = 3;
if crossup(C,var4+PriceScale*n) Then
T = 2;
if crossup(C,S2+PriceScale*n) Then
T = 1;
if CrossDown(C,R2-PriceScale*n) Then
T = -9;
if CrossDown(C,var1-PriceScale*n) Then
T = -8;
if CrossDown(C,R1-PriceScale*n) Then
T = -7;
if CrossDown(C,var2-PriceScale*n) Then
T = -6;
if CrossDown(C,Pivot-PriceScale*n) Then
T = -5;
if CrossDown(C,var3-PriceScale*n) Then
T = -4;
if CrossDown(C,S1-PriceScale*n) Then
T = -3;
if CrossDown(C,var4-PriceScale*n) Then
T = -2;
if CrossDown(C,S2-PriceScale*n) Then
T = -1;
if Tcond == true and Xcond == false then
{
if T != T[1] and
T >= 0 and T[1] <= 0 Then
Buy("매수");
if T != T[1] and
T <= 0 and T[1] >= 0 Then
Sell("매도");
}
즐거운 하루되세요
> 승부사1 님이 쓴 글입니다.
> 제목 : 피봇수식 수정 부탁드립니다.
> 아래의 수식은 피봇분봉을 이용하여 각각의 선을 돌파하면 매수
이탈하면 매도되도록 작성하였습니다.
5개의 선의 사이사이에 중간값으로 추가로 매매되도록 하고 싶습니다.
예를들어서 (Pivot + R1)/2를 하면 중간값이 나올거도 같은데
가능할런지요?? 가능하다면 수정에 도움을 주시길 희망합니다.
- 아 래 -
Pivot = (DayHigh(1)+DayLow(1)+DayClose(1))/3;
R1 = 2*Pivot-DayLow(1);
R2 = Pivot+DayHigh(1)-DayLow(1);
S1 = 2*Pivot-DayHigh(1);
S2 = Pivot-DayHigh(1)+DayLow(1);
if crossup(C,R2+PriceScale*n) Then
T = 5;
if crossup(C,R1+PriceScale*n) Then
T = 4;
if crossup(C,Pivot+PriceScale*n) Then
T = 3;
if crossup(C,S1+PriceScale*n) Then
T = 2;
if crossup(C,S2+PriceScale*n) Then
T = 1;
if CrossDown(C,R2-PriceScale*n) Then
T = -5;
if CrossDown(C,R1-PriceScale*n) Then
T = -4;
if CrossDown(C,Pivot-PriceScale*n) Then
T = -3;
if CrossDown(C,S1-PriceScale*n) Then
T = -2;
if CrossDown(C,S2-PriceScale*n) Then
T = -1;
if Tcond == true and Xcond == false then
{
if T != T[1] and
T >= 0 and T[1] <= 0 Then
Buy("매수");
if T != T[1] and
T <= 0 and T[1] >= 0 Then
Sell("매도");
}