커뮤니티
부탁드립니다.
2015-07-22 14:26:03
118
글번호 88769
아래 지표에서 매수인지 매도인지 표시와 금액표시를 다른 차트에도 적용하려 하는데 그 소스만 빼서 하려니 자꾸 오류가 나네요 그 소스만 좀 부탁드립니다. 그리고 다른 지표에 적용하려면 어떻게 해야하는지도 부탁드립니다.
var : T(0);
var1 = ma(c,5);
var2 = ma(C,400);
if var2[1]>var2[0] and
OPEN[0]>var1 and
OPEN[0]>CLOSE[0] Then
T = -1;
if var2[1]<var2[0] and
OPEN[0]<var1 and
OPEN[0]<CLOSE[0] Then
T = 1;
if MarketPosition == 0 and T == -1 and countif(T == T[1],3) == 3 Then{
sell();
Text_New(sdate,stime,H+PriceScale*2,"매도 : "+NumToStr(c,2));
}
if MarketPosition == 0 and T == 1 and countif(T == T[1],3) == 3 Then{
buy();
Text_New(sdate,stime,H+PriceScale*2,"매수 : "+NumToStr(c,2));
}
SetStopProfittarget(PriceScale*2,PointStop);
SetStopLoss(PriceScale*100,PointStop);
답변 1
예스스탁 예스스탁 답변
2015-07-22 17:24:25
안녕하세요
예스스탁입니다.
시스템과 결합된 내용은 일부만 빼서 표시하기는 어렵습니다.
따로 식을 작성한다고 보시면 됩니다.
아래 내용을 지표식으로 작성해 적용하시면 됩니다.
var : T(0),pst(0),EP(0);
var1 = ma(c,5);
var2 = ma(C,400);
if var2[1]>var2[0] and
OPEN[0]>var1 and
OPEN[0]>CLOSE[0] Then
T = -1;
if var2[1]<var2[0] and
OPEN[0]<var1 and
OPEN[0]<CLOSE[0] Then
T = 1;
if pst == 1 and pst[1] == 1 and (L <= EP-PriceScale*2 or H >= EP-PriceScale*100) Then
pst = 0;
if pst == -1 and pst[1] == -1 and (H >= EP+PriceScale*2 or L <= EP-PriceScale*100) Then
pst = 0;
if pst == 0 and T == -1 and countif(T == T[1],3) == 3 Then{
pst = 1;
EP = C;
Text_New(sdate,stime,H+PriceScale*2,"매도 : "+NumToStr(c,2));
}
if Pst == 0 and T == 1 and countif(T == T[1],3) == 3 Then{
pst = -1;
EP = C;
Text_New(sdate,stime,H+PriceScale*2,"매수 : "+NumToStr(c,2));
}
즐거운 하루되세요
> 매일상승 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> 아래 지표에서 매수인지 매도인지 표시와 금액표시를 다른 차트에도 적용하려 하는데 그 소스만 빼서 하려니 자꾸 오류가 나네요 그 소스만 좀 부탁드립니다. 그리고 다른 지표에 적용하려면 어떻게 해야하는지도 부탁드립니다.
var : T(0);
var1 = ma(c,5);
var2 = ma(C,400);
if var2[1]>var2[0] and
OPEN[0]>var1 and
OPEN[0]>CLOSE[0] Then
T = -1;
if var2[1]<var2[0] and
OPEN[0]<var1 and
OPEN[0]<CLOSE[0] Then
T = 1;
if MarketPosition == 0 and T == -1 and countif(T == T[1],3) == 3 Then{
sell();
Text_New(sdate,stime,H+PriceScale*2,"매도 : "+NumToStr(c,2));
}
if MarketPosition == 0 and T == 1 and countif(T == T[1],3) == 3 Then{
buy();
Text_New(sdate,stime,H+PriceScale*2,"매수 : "+NumToStr(c,2));
}
SetStopProfittarget(PriceScale*2,PointStop);
SetStopLoss(PriceScale*100,PointStop);
다음글