커뮤니티
익절후 진입
2012-09-26 22:06:11
226
글번호 55106
항상 친절한 답변 감사합니다.
예를들면 setstopprofittarget(2,pointstop);
로 익절한 후
1) 당일 매매를 종료하는 방법,
2) 익절봉 보다 5개봉이후에 조건이 되면 진입하는 방법
3) 익절보다 유리한 조건으로 재 진입하는 방법(만일 290에서 매수익절하였다면, 290이하에서 매수 재진입)을
알려주시면 감사하겠습니다.
예를 들면,
if crossup (c, ema(c,20) then buy();
if crossdown(c, ema(c,20) then sell();
setstoporofittarget(2,pointstop);
setstopendofday(145000);
위와 같은 수식을 1), 2), 3)조건을 사용하여 변형된 형태로 바꿔주시면 감사하겠습니다.
답변 1
예스스탁 예스스탁 답변
2012-09-27 15:48:49
안녕하세요
예스스탁입니다.
1.
Condition1 = MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("StopProfittarget",1) == true;
if Condition1 == false Then{
if crossup (c, ema(c,20)) then buy();
if crossdown(c, ema(c,20)) then sell();
}
SetStopProfittarget(2,pointstop);
setstopendofday(145000);
2.
Condition1 = MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("StopProfittarget",1) == true;
if Condition1 == false or (Condition1 == true and BarsSinceExit(1) >= 5) Then{
if crossup (c, ema(c,20)) then buy();
if crossdown(c, ema(c,20)) then sell();
}
SetStopProfittarget(2,pointstop);
setstopendofday(145000);
3.
Condition1 = MarketPosition == 0 and MarketPosition(1) == 1 and ExitDate(1) == sdate and IsExitName("StopProfittarget",1) == true;
Condition2 = MarketPosition == 0 and MarketPosition(1) == -1 and ExitDate(1) == sdate and IsExitName("StopProfittarget",1) == true;
if Condition1 == false or (Condition1 == true and c < ExitPrice(1)) Then
if crossup (c, ema(c,20)) then buy();
if Condition2 == false or (Condition2 == true and c > ExitPrice(1)) Then
if crossdown(c, ema(c,20)) then sell();
SetStopProfittarget(2,pointstop);
setstopendofday(145000);
즐거운 하루되세요
> 설이 님이 쓴 글입니다.
> 제목 : 익절후 진입
>
항상 친절한 답변 감사합니다.
예를들면 setstopprofittarget(2,pointstop);
로 익절한 후
1) 당일 매매를 종료하는 방법,
2) 익절봉 보다 5개봉이후에 조건이 되면 진입하는 방법
3) 익절보다 유리한 조건으로 재 진입하는 방법(만일 290에서 매수익절하였다면, 290이하에서 매수 재진입)을
알려주시면 감사하겠습니다.
예를 들면,
if crossup (c, ema(c,20) then buy();
if crossdown(c, ema(c,20) then sell();
setstoporofittarget(2,pointstop);
setstopendofday(145000);
위와 같은 수식을 1), 2), 3)조건을 사용하여 변형된 형태로 바꿔주시면 감사하겠습니다.