커뮤니티
시스템식
2011-06-20 11:54:15
607
글번호 39941
안녕하세요 문의드립니다.
1.매수 매도후 이익후청산 (SetStopTrailing(0.05,1.0,PointStop);) 진행후
방향이 매수방향이 1개봉이후 동일한경우 재매수 만약반대방향인경우 매수를 즉시 매도 로 전환 또한 방향이 이익후청산 (SetStopTrailing(0.05,1.0,PointStop);) 진행후 매도방향이 1개봉이후 동일한경우 재매도 만약반대방향인경우 매도를 즉시 매수로전환 식 부탁드립니다.
If (stime > 91000 and stime < 113000) THEN {
Condition1 = IsExitName("StopProfittarget",1) and ExitDate(1) == sdate;
if BarsSinceExit(1) > 1 then {
if stime>=90100 and Stime< 150300 and marketposition==0 then
if C > H[1] and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) and MarketPosition == 0 Then
buy("매수");
if MarketPosition == 1 Then
sell("반대매도",AtStop,L[BarsSinceEntry]-0.3-PriceScale);
if C < L[1] and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then
sell("매도");
if MarketPosition == -1 Then
buy("반대매수",AtStop,H[BarsSinceEntry]+0.7+PriceScale);
}
}
SetStopProfittarget(1.0,PercentStop);
SetStopTrailing(0.05,1.0,PointStop);
SetStopLoss(1.0,PercentStop);
SetStopEndofday(145900);
2. 시간대별로 이익청산식부탁드립니다.
감사합니다.
If (stime > 10000 and stime < 113000) THEN {
SetStopProfittarget(1.0,PercentStop);
}
답변 1
예스스탁 예스스탁 답변
2011-06-20 16:51:46
안녕하세요
예스스탁입니다.
1.
중복되는 표현은 모두 제거했습니다.
Condition1 = IsExitName("StopProfittarget",1) and ExitDate(1) == sdate;
If (stime > 91000 and stime < 113000) THEN {
if C > H[1] and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) and MarketPosition == 0 Then
buy("매수");
if MarketPosition == 1 Then
sell("반대매도",AtStop,L[BarsSinceEntry]-0.3-PriceScale);
if C < L[1] and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) and MarketPosition == 0 Then
sell("매도");
if MarketPosition == -1 Then
buy("반대매수",AtStop,H[BarsSinceEntry]+0.7+PriceScale);
if Condition1 == true and BarsSinceExit(1) > 1 Then{
if C > C[1] Then
buy();
if C < C[1] Then
sell();
}
}
SetStopProfittarget(1.0,PercentStop);
SetStopTrailing(0.05,1.0,PointStop);
SetStopLoss(1.0,PercentStop);
SetStopEndofday(145900);
2.
아래와 같이 시간을 분할해서 작성하시면 됩니다.
참고하셔서 작성하시기 바랍니다.
If (stime > 10000 and stime < 113000) THEN
SetStopProfittarget(1.0,PercentStop);
else If (stime > 11300 and stime < 123000) THEN
SetStopProfittarget(2.0,PercentStop);
else If (stime > 12300 and stime < 133000) THEN
SetStopProfittarget(3.0,PercentStop);
Else
SetStopProfittarget(0);
#10시~11시 30분 사이는 1%
#11시 30분~11시 30분 사이는 1%
#10시~11시 30분 사이는 1%
즐거운 하루되세요
> 외국인 님이 쓴 글입니다.
> 제목 : 시스템식
> 안녕하세요 문의드립니다.
1.매수 매도후 이익후청산 (SetStopTrailing(0.05,1.0,PointStop);) 진행후
방향이 매수방향이 1개봉이후 동일한경우 재매수 만약반대방향인경우 매수를 즉시 매도 로 전환 또한 방향이 이익후청산 (SetStopTrailing(0.05,1.0,PointStop);) 진행후 매도방향이 1개봉이후 동일한경우 재매도 만약반대방향인경우 매도를 즉시 매수로전환 식 부탁드립니다.
If (stime > 91000 and stime < 113000) THEN {
Condition1 = IsExitName("StopProfittarget",1) and ExitDate(1) == sdate;
if BarsSinceExit(1) > 1 then {
if stime>=90100 and Stime< 150300 and marketposition==0 then
if C > H[1] and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) and MarketPosition == 0 Then
buy("매수");
if MarketPosition == 1 Then
sell("반대매도",AtStop,L[BarsSinceEntry]-0.3-PriceScale);
if C < L[1] and ((Condition1 == true and BarsSinceExit(1) >= 1) or Condition1 == false) Then
sell("매도");
if MarketPosition == -1 Then
buy("반대매수",AtStop,H[BarsSinceEntry]+0.7+PriceScale);
}
}
SetStopProfittarget(1.0,PercentStop);
SetStopTrailing(0.05,1.0,PointStop);
SetStopLoss(1.0,PercentStop);
SetStopEndofday(145900);
2. 시간대별로 이익청산식부탁드립니다.
감사합니다.
If (stime > 10000 and stime < 113000) THEN {
SetStopProfittarget(1.0,PercentStop);
}