답변완료
문의드립니다.
input : P1(20),P2(30),P3(60),P4(175),ss1(0),ss2(0);
Input : Period(80), D(120);
Input : RSIPeriod(20);
input : 손절틱수(50);
var : mav1(0),mav2(0),mav3(0),mav4(0);
var : BBdown(0),BBUp(0),BandB(0),RSIV(0);
mav1 = ema(c,P1);
mav2 = ema(c,P2);
mav3 = ema(c,P3);
mav4 = ema(c,P4);
BBDown = BollBandDown(Period,D);
BBUp = BollBandUp(Period,D);
BandB = ((C-BBDown)/(BBUp-BBDown))*100;
RSIV = RSI(RSIPeriod);
if BandB > 50 and crossup(BandB,rsiv) Then
Buy("b",AtLimit,C-(H-L)*0.5);
if BandB < 50 and crossdown(BandB,rsiv) Then
Sell("s",AtLimit,C+(H-L)*0.5);
if MarketPosition == 1 Then
{
ExitLong("bx",AtStop,C[BarsSinceEntry+1]-PriceScale*손절틱수);
}
if MarketPosition == -1 Then
{
ExitShort("sx",AtStop,C[BarsSinceEntry+1]+PriceScale*손절틱수);
}
위 식에서 익절도 부탁 드립니다. (86869 문의 연계)
★그런데 익절도 똑같이 전봉(신호 발생봉) 대비 틱수로 해주세요.. 손절 반대로 하니깐
안되더라구요.
2024-04-26
786
글번호 178972
시스템