커뮤니티
문의드립니다
2015-10-19 11:09:29
127
글번호 91407
안녕하세요.
아래식에서 진입후 1.최대손실(틱)
2.최대수익(틱)
3.평균손실(틱)
4.평균수익(틱)
지표값을 구하고자합니다.
==> 전체에대한 지표값이 아닌 각 건별 (매수,매도)에 대한 지표값.
감사합니다.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
input : af1(0.01),max1(0.1);
input : S1(20),S2(47),P1(53);
var : para1(0),T1(0);
var : Bcond1(false);
var : Scond1(false);
para1 = sar(af1,max1);
if stime >= 170000 or stime < 160000 Then{
if crossup(C,para1) Then{
Bcond1 = false;
var1 = H;
var2 = L;
T1 = 1;
}
if CrossDown(C,para1) Then{
Scond1 = false;
var1 = L;
var2 = H;
T1 = -1;
}
if T1 == 1 and T1[1] == 1 and Bcond1 == false and H >= var1[1]+PriceScale*1 Then
Bcond1 = true;
if T1 == -1 and T1[1] == -1 and Scond1 == false and L <= var1[1]-PriceScale*1 Then
Scond1 = true;
if T1 == 1 and Bcond1 == false Then
buy("B1",AtStop,var1+PriceScale*1);
if T1 == -1 and Scond1 == false Then
sell("S1",AtStop,var1-PriceScale*1);
##청산
if MarketPosition == 1 then{
if CrossDown(c,para1) Then
exitlong("bx1");
}
if MarketPosition == -1 then{
if crossup(c,para1) Then
ExitShort("sx1");
}
}
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*P1 Then
exitlong("btr",AtStop,highest(H,BarsSinceEntry)-PriceScale*1);
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*P1 Then
exitshort("str",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*1);
if MarketPosition == 1 and c < var2 Then
ExitLong("손절1",AtStop,EntryPrice-PriceScale*s1);
if MarketPosition == -1 and c > var2 Then
ExitShort("손절2",AtStop,EntryPrice+PriceScale*s1);
SetStopLoss(PriceScale*S2,PointStop);
if stime == 160000 or (stime > 160000 and stime[1] < 160000) Then{
exitlong("bexit");
ExitShort("sexit");
}
답변 1
예스스탁 예스스탁 답변
2015-10-19 16:27:19
안녕하세요
예스스탁입니다.
시스템에서는 plot명령어를 사용할수 없어
문의하신 내용 지표로 보실수가 없습니다.
도움을 드리지 못해 죄송합니다.
즐거운 하루되세요
> 베드로 님이 쓴 글입니다.
> 제목 : 문의드립니다
> 안녕하세요.
아래식에서 진입후 1.최대손실(틱)
2.최대수익(틱)
3.평균손실(틱)
4.평균수익(틱)
지표값을 구하고자합니다.
==> 전체에대한 지표값이 아닌 각 건별 (매수,매도)에 대한 지표값.
감사합니다.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
input : af1(0.01),max1(0.1);
input : S1(20),S2(47),P1(53);
var : para1(0),T1(0);
var : Bcond1(false);
var : Scond1(false);
para1 = sar(af1,max1);
if stime >= 170000 or stime < 160000 Then{
if crossup(C,para1) Then{
Bcond1 = false;
var1 = H;
var2 = L;
T1 = 1;
}
if CrossDown(C,para1) Then{
Scond1 = false;
var1 = L;
var2 = H;
T1 = -1;
}
if T1 == 1 and T1[1] == 1 and Bcond1 == false and H >= var1[1]+PriceScale*1 Then
Bcond1 = true;
if T1 == -1 and T1[1] == -1 and Scond1 == false and L <= var1[1]-PriceScale*1 Then
Scond1 = true;
if T1 == 1 and Bcond1 == false Then
buy("B1",AtStop,var1+PriceScale*1);
if T1 == -1 and Scond1 == false Then
sell("S1",AtStop,var1-PriceScale*1);
##청산
if MarketPosition == 1 then{
if CrossDown(c,para1) Then
exitlong("bx1");
}
if MarketPosition == -1 then{
if crossup(c,para1) Then
ExitShort("sx1");
}
}
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*P1 Then
exitlong("btr",AtStop,highest(H,BarsSinceEntry)-PriceScale*1);
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*P1 Then
exitshort("str",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*1);
if MarketPosition == 1 and c < var2 Then
ExitLong("손절1",AtStop,EntryPrice-PriceScale*s1);
if MarketPosition == -1 and c > var2 Then
ExitShort("손절2",AtStop,EntryPrice+PriceScale*s1);
SetStopLoss(PriceScale*S2,PointStop);
if stime == 160000 or (stime > 160000 and stime[1] < 160000) Then{
exitlong("bexit");
ExitShort("sexit");
}
다음글
이전글