커뮤니티
시스템식 추가 부탁합니다
2014-01-21 23:43:25
120
글번호 71702
안녕하세요
이식에서 매수,매도 진입시 5일선이 20일선을 골든크로스,데드크로스 할경우 매수 매도
식이 나갈수 있도록 추가해주세요 이밑에있는 진입조건과 골드 데드크로스 진입조건 2개가 만족할경우 진입하는걸로요
수고하세요~~~
var : Bcount(0),Scount(0);
var1 = ma(c,20);
Var2 = ma(c,60);
Var3 = ma(c,120);
if stime == 10000 or (stime > 1000 and stime[1] < 1000) Then{
Bcount = 0;
Scount = 0;
}
if MarketPosition == 1 and MarketPosition[1] != 1 Then
Bcount = Bcount+1;
if MarketPosition == -1 and MarketPosition[1] != -1 Then
Scount = Scount+1;
if stime >= 0 and stime <= 240000 Then{
if MarketPosition <= 0 and Bcount < 1 and var1 > var2 and C > O and H >= L+PriceScale*40 Then
buy("매수진입",AtMarket);
if MarketPosition >= 0 and Bcount < 1 and var1 < var2 and C <= O-PriceScale*35 Then
sell("매도진입",AtMarket,def,1);
}
if MarketPosition == 1 Then{
ExitLong("매수손절",AtStop,EntryPrice-PriceScale*30);
if CurrentContracts == MaxContracts Then
ExitLong("매수수익",atlimit,EntryPrice+PriceScale*40);
}
if MarketPosition == -1 Then{
ExitShort("매도손절",AtStop,EntryPrice+PriceScale*30);
if CurrentContracts == MaxContracts Then
ExitShort("매도수익",atlimit,EntryPrice-PriceScale*40);
}
답변 1
예스스탁 예스스탁 답변
2014-01-22 10:10:09
안녕하세요
예스스탁입니다.
var : Bcount(0),Scount(0);
var : mav1(0),mav2(0),mav3(0),mav4(0);
mav1 = ma(c,5);
mav2 = ma(c,20);
mav3 = ma(c,60);
mav4 = ma(c,120);
if stime == 10000 or (stime > 1000 and stime[1] < 1000) Then{
Bcount = 0;
Scount = 0;
}
if MarketPosition == 1 and MarketPosition[1] != 1 Then
Bcount = Bcount+1;
if MarketPosition == -1 and MarketPosition[1] != -1 Then
Scount = Scount+1;
if stime >= 0 and stime <= 240000 Then{
if MarketPosition <= 0 and Bcount < 1 and mav2 > mav3 and crossup(mav1,mav2) and C > O and H >= L+PriceScale*40 Then
buy("매수진입",AtMarket);
if MarketPosition >= 0 and Bcount < 1 and mav2 < mav3 and CrossDown(mav1,mav2) and C <= O-PriceScale*35 Then
sell("매도진입",AtMarket,def,1);
}
if MarketPosition == 1 Then{
ExitLong("매수손절",AtStop,EntryPrice-PriceScale*30);
if CurrentContracts == MaxContracts Then
ExitLong("매수수익",atlimit,EntryPrice+PriceScale*40);
}
if MarketPosition == -1 Then{
ExitShort("매도손절",AtStop,EntryPrice+PriceScale*30);
if CurrentContracts == MaxContracts Then
ExitShort("매도수익",atlimit,EntryPrice-PriceScale*40);
}
즐거운 하루되세요
> HI_jh***** 님이 쓴 글입니다.
> 제목 : 시스템식 추가 부탁합니다
> 안녕하세요
이식에서 매수,매도 진입시 5일선이 20일선을 골든크로스,데드크로스 할경우 매수 매도
식이 나갈수 있도록 추가해주세요 이밑에있는 진입조건과 골드 데드크로스 진입조건 2개가 만족할경우 진입하는걸로요
수고하세요~~~
var : Bcount(0),Scount(0);
var1 = ma(c,20);
Var2 = ma(c,60);
Var3 = ma(c,120);
if stime == 10000 or (stime > 1000 and stime[1] < 1000) Then{
Bcount = 0;
Scount = 0;
}
if MarketPosition == 1 and MarketPosition[1] != 1 Then
Bcount = Bcount+1;
if MarketPosition == -1 and MarketPosition[1] != -1 Then
Scount = Scount+1;
if stime >= 0 and stime <= 240000 Then{
if MarketPosition <= 0 and Bcount < 1 and var1 > var2 and C > O and H >= L+PriceScale*40 Then
buy("매수진입",AtMarket);
if MarketPosition >= 0 and Bcount < 1 and var1 < var2 and C <= O-PriceScale*35 Then
sell("매도진입",AtMarket,def,1);
}
if MarketPosition == 1 Then{
ExitLong("매수손절",AtStop,EntryPrice-PriceScale*30);
if CurrentContracts == MaxContracts Then
ExitLong("매수수익",atlimit,EntryPrice+PriceScale*40);
}
if MarketPosition == -1 Then{
ExitShort("매도손절",AtStop,EntryPrice+PriceScale*30);
if CurrentContracts == MaxContracts Then
ExitShort("매도수익",atlimit,EntryPrice-PriceScale*40);
}