커뮤니티
수식문의
2017-01-19 23:12:03
118
글번호 106111
안녕하세요
하기 수식에 추가적인 보완을 하고 싶어서 문의 드립니다.
도움 부탁드립니다.
input : P(14),BBP(20),dv(2),MAP(60);
input : short(12),long(26),sig(9);
var : ADXV(0),DP(0),DM(0),T(0),BBup(0),BBdn(0),mav(0);
var : MACDV(0),MACDS(0),Bcond(false),Scond(False);;
ADXV = ADX(P);
DP = Diplus(P);
DM = DiMinus(P);
BBup = BollBandUp(BBP,dv);
BBdn = BollBandDown(BBP,dv);
mav = ma(C,MAP);
MACDV = MACD(short,long);
MACDS = ema(MACDV,sig);
Bcond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == -1 and BarsSinceEntry >= 4);
Scond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == 1 and BarsSinceEntry >= 4);
if MarketPosition == 0 Then{
if MarketPosition(1) == 1 and IsExitName("StopTrailing",1) == true and H > BBup Then{
buy("bb",AtStop,C+PriceScale);
}
if MarketPosition(1) == -1 and IsExitName("StopTrailing",1) == true and L < BBdn Then{
sell("ss",AtStop,C-PriceScale);
}
}
if MarketPosition == 1 and IsEntryName("bb") == true Then{
if CrossDown(DP,DM) and scond == true Then
sell("ss2");
}
if MarketPosition == -1 and IsEntryName("ss") == true Then{
if crossup(DP,DM) and Bcond == true Then
Buy("bb2");
}
상기 수식에서
하기 보완 요청은 죄송하지만, 봉완성기준 청산과 가격에 도달하였을때 바로 청산하는
두가지 버젼으로 수식 부탁드립니다
bb로 진입하였는데, 5틱이상의 이익이 나지 않고,
10틱이상 손실이나면 손절로 처리하고 청산하는 수식 부탁드립니다.
ss도 마찬가지로 진입하였는데, 5틱이상 이익이 나지 않고,
10틱이상 손실이나면 손절로 처리하고 청산하는 수식 부탁드립니다.
만약 5틱이상 이익이 나면, 그냥 손절이 나든 익절이 나든 상관없이
현재 포지션 유지합니다.
그리고 한가지 더 부탁드립니다.
bb나 ss로 진입하였는데 봉이 볼린져벤드 중앙이평을 넘어사면
청산하는 수식도 같이 부탁드립니다.
상기 수식으로 청산이 되더라도, bb2와 ss2는 신호가 발생하면 진입되게 부탁드립니다.
감사합니다.
답변 3
예스스탁 예스스탁 답변
2017-01-20 13:41:36
안녕하세요
예스스탁입니다.
input : P(14),BBP(20),dv(2),MAP(60);
input : short(12),long(26),sig(9);
var : ADXV(0),DP(0),DM(0),T(0),BBup(0),BBdn(0),mav(0);
var : MACDV(0),MACDS(0),Bcond(false),Scond(False),bbmd(0);
ADXV = ADX(P);
DP = Diplus(P);
DM = DiMinus(P);
bbmd = ma(c,BBP);
BBup = BollBandUp(BBP,dv);
BBdn = BollBandDown(BBP,dv);
mav = ma(C,MAP);
MACDV = MACD(short,long);
MACDS = ema(MACDV,sig);
Bcond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == -1 and BarsSinceEntry >= 4);
Scond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == 1 and BarsSinceEntry >= 4);
if MarketPosition == 0 Then{
if MarketPosition(1) == 1 and (IsExitName("StopTrailing",1) == true or IsExitName("bx",1) == true) and H > BBup Then{
buy("bb",AtStop,C+PriceScale);
}
if MarketPosition(1) == -1 and (IsExitName("StopTrailing",1) == true or IsExitName("2x",1) == true) and L < BBdn Then{
sell("ss",AtStop,C-PriceScale);
}
}
if MarketPosition == 1 and IsEntryName("bb") == true Then{
if CrossDown(DP,DM) and scond == true Then
sell("ss2");
}
if MarketPosition == -1 and IsEntryName("ss") == true Then{
if crossup(DP,DM) and Bcond == true Then
Buy("bb2");
}
if MarketPosition == 1 then{
if highest(H,BarsSinceEntry) < EntryPrice+PriceScale*5 Then
ExitLong("bL",AtStop,EntryPrice-PriceScale*10);
if CrossDown(c,bbmd) Then
ExitLong("bx");
}
if MarketPosition == -1 then{
if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*5 Then
ExitShort("sL",AtStop,EntryPrice+PriceScale*10);
if crossup(c,bbmd) Then
ExitShort("sx");
}
즐거운 하루되세요
> softtoug 님이 쓴 글입니다.
> 제목 : 수식문의
> 안녕하세요
하기 수식에 추가적인 보완을 하고 싶어서 문의 드립니다.
도움 부탁드립니다.
input : P(14),BBP(20),dv(2),MAP(60);
input : short(12),long(26),sig(9);
var : ADXV(0),DP(0),DM(0),T(0),BBup(0),BBdn(0),mav(0);
var : MACDV(0),MACDS(0),Bcond(false),Scond(False);;
ADXV = ADX(P);
DP = Diplus(P);
DM = DiMinus(P);
BBup = BollBandUp(BBP,dv);
BBdn = BollBandDown(BBP,dv);
mav = ma(C,MAP);
MACDV = MACD(short,long);
MACDS = ema(MACDV,sig);
Bcond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == -1 and BarsSinceEntry >= 4);
Scond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == 1 and BarsSinceEntry >= 4);
if MarketPosition == 0 Then{
if MarketPosition(1) == 1 and IsExitName("StopTrailing",1) == true and H > BBup Then{
buy("bb",AtStop,C+PriceScale);
}
if MarketPosition(1) == -1 and IsExitName("StopTrailing",1) == true and L < BBdn Then{
sell("ss",AtStop,C-PriceScale);
}
}
if MarketPosition == 1 and IsEntryName("bb") == true Then{
if CrossDown(DP,DM) and scond == true Then
sell("ss2");
}
if MarketPosition == -1 and IsEntryName("ss") == true Then{
if crossup(DP,DM) and Bcond == true Then
Buy("bb2");
}
상기 수식에서
하기 보완 요청은 죄송하지만, 봉완성기준 청산과 가격에 도달하였을때 바로 청산하는
두가지 버젼으로 수식 부탁드립니다
bb로 진입하였는데, 5틱이상의 이익이 나지 않고,
10틱이상 손실이나면 손절로 처리하고 청산하는 수식 부탁드립니다.
ss도 마찬가지로 진입하였는데, 5틱이상 이익이 나지 않고,
10틱이상 손실이나면 손절로 처리하고 청산하는 수식 부탁드립니다.
만약 5틱이상 이익이 나면, 그냥 손절이 나든 익절이 나든 상관없이
현재 포지션 유지합니다.
그리고 한가지 더 부탁드립니다.
bb나 ss로 진입하였는데 봉이 볼린져벤드 중앙이평을 넘어사면
청산하는 수식도 같이 부탁드립니다.
상기 수식으로 청산이 되더라도, bb2와 ss2는 신호가 발생하면 진입되게 부탁드립니다.
감사합니다.
softtoug
2017-01-20 16:32:43
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 수식문의
>
안녕하세요
예스스탁입니다.
input : P(14),BBP(20),dv(2),MAP(60);
input : short(12),long(26),sig(9);
var : ADXV(0),DP(0),DM(0),T(0),BBup(0),BBdn(0),mav(0);
var : MACDV(0),MACDS(0),Bcond(false),Scond(False),bbmd(0);
ADXV = ADX(P);
DP = Diplus(P);
DM = DiMinus(P);
bbmd = ma(c,BBP);
BBup = BollBandUp(BBP,dv);
BBdn = BollBandDown(BBP,dv);
mav = ma(C,MAP);
MACDV = MACD(short,long);
MACDS = ema(MACDV,sig);
Bcond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == -1 and BarsSinceEntry >= 4);
Scond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == 1 and BarsSinceEntry >= 4);
if MarketPosition == 0 Then{
if MarketPosition(1) == 1 and (IsExitName("StopTrailing",1) == true or IsExitName("bx",1) == true) and H > BBup Then{
buy("bb",AtStop,C+PriceScale);
}
if MarketPosition(1) == -1 and (IsExitName("StopTrailing",1) == true or IsExitName("2x",1) == true) and L < BBdn Then{
sell("ss",AtStop,C-PriceScale);
}
}
if MarketPosition == 1 and IsEntryName("bb") == true Then{
if CrossDown(DP,DM) and scond == true Then
sell("ss2");
}
if MarketPosition == -1 and IsEntryName("ss") == true Then{
if crossup(DP,DM) and Bcond == true Then
Buy("bb2");
}
if MarketPosition == 1 then{
if highest(H,BarsSinceEntry) < EntryPrice+PriceScale*5 Then
ExitLong("bL",AtStop,EntryPrice-PriceScale*10);
if CrossDown(c,bbmd) Then
ExitLong("bx");
}
if MarketPosition == -1 then{
if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*5 Then
ExitShort("sL",AtStop,EntryPrice+PriceScale*10);
if crossup(c,bbmd) Then
ExitShort("sx");
}
즐거운 하루되세요
> softtoug 님이 쓴 글입니다.
> 제목 : 수식문의
> 안녕하세요
하기 수식에 추가적인 보완을 하고 싶어서 문의 드립니다.
도움 부탁드립니다.
input : P(14),BBP(20),dv(2),MAP(60);
input : short(12),long(26),sig(9);
var : ADXV(0),DP(0),DM(0),T(0),BBup(0),BBdn(0),mav(0);
var : MACDV(0),MACDS(0),Bcond(false),Scond(False);;
ADXV = ADX(P);
DP = Diplus(P);
DM = DiMinus(P);
BBup = BollBandUp(BBP,dv);
BBdn = BollBandDown(BBP,dv);
mav = ma(C,MAP);
MACDV = MACD(short,long);
MACDS = ema(MACDV,sig);
Bcond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == -1 and BarsSinceEntry >= 4);
Scond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == 1 and BarsSinceEntry >= 4);
if MarketPosition == 0 Then{
if MarketPosition(1) == 1 and IsExitName("StopTrailing",1) == true and H > BBup Then{
buy("bb",AtStop,C+PriceScale);
}
if MarketPosition(1) == -1 and IsExitName("StopTrailing",1) == true and L < BBdn Then{
sell("ss",AtStop,C-PriceScale);
}
}
if MarketPosition == 1 and IsEntryName("bb") == true Then{
if CrossDown(DP,DM) and scond == true Then
sell("ss2");
}
if MarketPosition == -1 and IsEntryName("ss") == true Then{
if crossup(DP,DM) and Bcond == true Then
Buy("bb2");
}
상기 수식에서
하기 보완 요청은 죄송하지만, 봉완성기준 청산과 가격에 도달하였을때 바로 청산하는
두가지 버젼으로 수식 부탁드립니다
bb로 진입하였는데, 5틱이상의 이익이 나지 않고,
10틱이상 손실이나면 손절로 처리하고 청산하는 수식 부탁드립니다.
ss도 마찬가지로 진입하였는데, 5틱이상 이익이 나지 않고,
10틱이상 손실이나면 손절로 처리하고 청산하는 수식 부탁드립니다.
만약 5틱이상 이익이 나면, 그냥 손절이 나든 익절이 나든 상관없이
현재 포지션 유지합니다.
그리고 한가지 더 부탁드립니다.
bb나 ss로 진입하였는데 봉이 볼린져벤드 중앙이평을 넘어사면
청산하는 수식도 같이 부탁드립니다.
상기 수식으로 청산이 되더라도, bb2와 ss2는 신호가 발생하면 진입되게 부탁드립니다.
감사합니다.
softtoug
2017-01-20 16:32:48
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 수식문의
>
안녕하세요
예스스탁입니다.
input : P(14),BBP(20),dv(2),MAP(60);
input : short(12),long(26),sig(9);
var : ADXV(0),DP(0),DM(0),T(0),BBup(0),BBdn(0),mav(0);
var : MACDV(0),MACDS(0),Bcond(false),Scond(False),bbmd(0);
ADXV = ADX(P);
DP = Diplus(P);
DM = DiMinus(P);
bbmd = ma(c,BBP);
BBup = BollBandUp(BBP,dv);
BBdn = BollBandDown(BBP,dv);
mav = ma(C,MAP);
MACDV = MACD(short,long);
MACDS = ema(MACDV,sig);
Bcond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == -1 and BarsSinceEntry >= 4);
Scond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == 1 and BarsSinceEntry >= 4);
if MarketPosition == 0 Then{
if MarketPosition(1) == 1 and (IsExitName("StopTrailing",1) == true or IsExitName("bx",1) == true) and H > BBup Then{
buy("bb",AtStop,C+PriceScale);
}
if MarketPosition(1) == -1 and (IsExitName("StopTrailing",1) == true or IsExitName("2x",1) == true) and L < BBdn Then{
sell("ss",AtStop,C-PriceScale);
}
}
if MarketPosition == 1 and IsEntryName("bb") == true Then{
if CrossDown(DP,DM) and scond == true Then
sell("ss2");
}
if MarketPosition == -1 and IsEntryName("ss") == true Then{
if crossup(DP,DM) and Bcond == true Then
Buy("bb2");
}
if MarketPosition == 1 then{
if highest(H,BarsSinceEntry) < EntryPrice+PriceScale*5 Then
ExitLong("bL",AtStop,EntryPrice-PriceScale*10);
if CrossDown(c,bbmd) Then
ExitLong("bx");
}
if MarketPosition == -1 then{
if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*5 Then
ExitShort("sL",AtStop,EntryPrice+PriceScale*10);
if crossup(c,bbmd) Then
ExitShort("sx");
}
즐거운 하루되세요
> softtoug 님이 쓴 글입니다.
> 제목 : 수식문의
> 안녕하세요
하기 수식에 추가적인 보완을 하고 싶어서 문의 드립니다.
도움 부탁드립니다.
input : P(14),BBP(20),dv(2),MAP(60);
input : short(12),long(26),sig(9);
var : ADXV(0),DP(0),DM(0),T(0),BBup(0),BBdn(0),mav(0);
var : MACDV(0),MACDS(0),Bcond(false),Scond(False);;
ADXV = ADX(P);
DP = Diplus(P);
DM = DiMinus(P);
BBup = BollBandUp(BBP,dv);
BBdn = BollBandDown(BBP,dv);
mav = ma(C,MAP);
MACDV = MACD(short,long);
MACDS = ema(MACDV,sig);
Bcond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == -1 and BarsSinceEntry >= 4);
Scond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 4) or (MarketPosition == 1 and BarsSinceEntry >= 4);
if MarketPosition == 0 Then{
if MarketPosition(1) == 1 and IsExitName("StopTrailing",1) == true and H > BBup Then{
buy("bb",AtStop,C+PriceScale);
}
if MarketPosition(1) == -1 and IsExitName("StopTrailing",1) == true and L < BBdn Then{
sell("ss",AtStop,C-PriceScale);
}
}
if MarketPosition == 1 and IsEntryName("bb") == true Then{
if CrossDown(DP,DM) and scond == true Then
sell("ss2");
}
if MarketPosition == -1 and IsEntryName("ss") == true Then{
if crossup(DP,DM) and Bcond == true Then
Buy("bb2");
}
상기 수식에서
하기 보완 요청은 죄송하지만, 봉완성기준 청산과 가격에 도달하였을때 바로 청산하는
두가지 버젼으로 수식 부탁드립니다
bb로 진입하였는데, 5틱이상의 이익이 나지 않고,
10틱이상 손실이나면 손절로 처리하고 청산하는 수식 부탁드립니다.
ss도 마찬가지로 진입하였는데, 5틱이상 이익이 나지 않고,
10틱이상 손실이나면 손절로 처리하고 청산하는 수식 부탁드립니다.
만약 5틱이상 이익이 나면, 그냥 손절이 나든 익절이 나든 상관없이
현재 포지션 유지합니다.
그리고 한가지 더 부탁드립니다.
bb나 ss로 진입하였는데 봉이 볼린져벤드 중앙이평을 넘어사면
청산하는 수식도 같이 부탁드립니다.
상기 수식으로 청산이 되더라도, bb2와 ss2는 신호가 발생하면 진입되게 부탁드립니다.
감사합니다.