커뮤니티
수고하십니다
2016-10-27 17:38:44
100
글번호 103447
input : short(12),long(26),sig(9),P1(5),P2(20),당일수익틱수(100),당일손실틱수(50);
var : MACDV(0),MACDS(0),mav1(0),mav2(0),당일수익(0),당일손실(0);
var : NP(0),TT(0),N1(0),T1(0),dayPL(0),entry(0),Tcond(false),Xcond(false);
MACDV = MACD(short,long);
MACDS = ema(C,sig);
mav1 = ma(C,P1);
mav2 = ma(C,P2);
NP = NetProfit;
TT = TotalTrades;
당일수익 = PriceScale*당일수익틱수;
당일손실 = PriceScale*당일손실틱수;
if stime == 101500 or (stime > 101500 and stime[1] < 101500) Then{
Tcond = true;
Xcond = false;
var1 = O;
N1 = NP;
T1 = TT;
}
if MarketPosition == 0 Then
entry = TT-T1;
Else
entry = TT-T1+1;
dayPL = NP-N1;
if TotalTrades > TotalTrades[1] and
(IsExitName("bp",1) or IsExitName("bl",1) or IsExitName("sp",1) or IsExitName("sl",1)) Then
Xcond = true;
if Tcond == true and stime >= 103000 and stime < 165000 and entry < 3 and Xcond == false then{
if c > var1 and crossup(MACDV,MACDS) and crossup(mav1,mav2) Then
buy("b");
if c < var1 and CrossDown(MACDV,MACDS) and CrossDown(mav1,mav2) Then
sell("s");
}
if MarketPosition == 1 Then{
ExitLong("bp",atlimit,EntryPrice+당일수익-dayPL);
ExitLong("bl",AtStop,EntryPrice-당일손실-dayPL);
if C < var1 or CrossDown(mav1,mav2) or CrossDown(MACDv,MACDS) Then
ExitLong("bx");
}
if MarketPosition == -1 Then{
ExitShort("sp",atlimit,EntryPrice-당일수익+dayPL);
ExitShort("sl",AtStop,EntryPrice+당일손실+dayPL);
if C > var1 or CrossUp(mav1,mav2) or CrossUp(MACDv,MACDS) Then
ExitShort("sx");
}
SetStopLoss(PriceScale*20,PointStop);
SetStopProfittarget(PriceScale*50,PointStop);
위식에서 진입조건추가하고십습니다
매수식 봉의종가가 시가보다100틱이크면 진입금지
매도식 봉의종가가 시가보다100틱이작으면 진입금지
부탁드립니다
답변 1
예스스탁 예스스탁 답변
2016-10-28 10:13:09
안녕하세요
예스스탁입니다.
input : short(12),long(26),sig(9),P1(5),P2(20),당일수익틱수(100),당일손실틱수(50);
var : MACDV(0),MACDS(0),mav1(0),mav2(0),당일수익(0),당일손실(0);
var : NP(0),TT(0),N1(0),T1(0),dayPL(0),entry(0),Tcond(false),Xcond(false);
MACDV = MACD(short,long);
MACDS = ema(C,sig);
mav1 = ma(C,P1);
mav2 = ma(C,P2);
NP = NetProfit;
TT = TotalTrades;
당일수익 = PriceScale*당일수익틱수;
당일손실 = PriceScale*당일손실틱수;
if stime == 101500 or (stime > 101500 and stime[1] < 101500) Then{
Tcond = true;
Xcond = false;
var1 = O;
N1 = NP;
T1 = TT;
}
if MarketPosition == 0 Then
entry = TT-T1;
Else
entry = TT-T1+1;
dayPL = NP-N1;
if TotalTrades > TotalTrades[1] and
(IsExitName("bp",1) or IsExitName("bl",1) or IsExitName("sp",1) or IsExitName("sl",1)) Then
Xcond = true;
if Tcond == true and stime >= 103000 and stime < 165000 and entry < 3 and Xcond == false then{
if c > var1 and C < var1+PriceScale*100 and crossup(MACDV,MACDS) and crossup(mav1,mav2) Then
buy("b");
if c < var1 and C > var1-PriceScale*100 and CrossDown(MACDV,MACDS) and CrossDown(mav1,mav2) Then
sell("s");
}
if MarketPosition == 1 Then{
ExitLong("bp",atlimit,EntryPrice+당일수익-dayPL);
ExitLong("bl",AtStop,EntryPrice-당일손실-dayPL);
if C < var1 or CrossDown(mav1,mav2) or CrossDown(MACDv,MACDS) Then
ExitLong("bx");
}
if MarketPosition == -1 Then{
ExitShort("sp",atlimit,EntryPrice-당일수익+dayPL);
ExitShort("sl",AtStop,EntryPrice+당일손실+dayPL);
if C > var1 or CrossUp(mav1,mav2) or CrossUp(MACDv,MACDS) Then
ExitShort("sx");
}
SetStopLoss(PriceScale*20,PointStop);
SetStopProfittarget(PriceScale*50,PointStop);
즐거운 하루되세요
> 수원 님이 쓴 글입니다.
> 제목 : 수고하십니다
> input : short(12),long(26),sig(9),P1(5),P2(20),당일수익틱수(100),당일손실틱수(50);
var : MACDV(0),MACDS(0),mav1(0),mav2(0),당일수익(0),당일손실(0);
var : NP(0),TT(0),N1(0),T1(0),dayPL(0),entry(0),Tcond(false),Xcond(false);
MACDV = MACD(short,long);
MACDS = ema(C,sig);
mav1 = ma(C,P1);
mav2 = ma(C,P2);
NP = NetProfit;
TT = TotalTrades;
당일수익 = PriceScale*당일수익틱수;
당일손실 = PriceScale*당일손실틱수;
if stime == 101500 or (stime > 101500 and stime[1] < 101500) Then{
Tcond = true;
Xcond = false;
var1 = O;
N1 = NP;
T1 = TT;
}
if MarketPosition == 0 Then
entry = TT-T1;
Else
entry = TT-T1+1;
dayPL = NP-N1;
if TotalTrades > TotalTrades[1] and
(IsExitName("bp",1) or IsExitName("bl",1) or IsExitName("sp",1) or IsExitName("sl",1)) Then
Xcond = true;
if Tcond == true and stime >= 103000 and stime < 165000 and entry < 3 and Xcond == false then{
if c > var1 and crossup(MACDV,MACDS) and crossup(mav1,mav2) Then
buy("b");
if c < var1 and CrossDown(MACDV,MACDS) and CrossDown(mav1,mav2) Then
sell("s");
}
if MarketPosition == 1 Then{
ExitLong("bp",atlimit,EntryPrice+당일수익-dayPL);
ExitLong("bl",AtStop,EntryPrice-당일손실-dayPL);
if C < var1 or CrossDown(mav1,mav2) or CrossDown(MACDv,MACDS) Then
ExitLong("bx");
}
if MarketPosition == -1 Then{
ExitShort("sp",atlimit,EntryPrice-당일수익+dayPL);
ExitShort("sl",AtStop,EntryPrice+당일손실+dayPL);
if C > var1 or CrossUp(mav1,mav2) or CrossUp(MACDv,MACDS) Then
ExitShort("sx");
}
SetStopLoss(PriceScale*20,PointStop);
SetStopProfittarget(PriceScale*50,PointStop);
위식에서 진입조건추가하고십습니다
매수식 봉의종가가 시가보다100틱이크면 진입금지
매도식 봉의종가가 시가보다100틱이작으면 진입금지
부탁드립니다