커뮤니티
수식부탁드립니다--
2012-03-06 19:26:09
406
글번호 48636
if var1 > (길이-1) and var1 <= 길이 Then{
plot1(상기준,"1",WHITE);
plot2(하기준,"2",WHITE);
}
위 지표식을 시스템식으로 바꿔서
포지션이 없을때 지수가 상기준을 상향돌파하면 "매수" 상기준+1틱 터치후 내려오면 상기준과 하기준 정중간에서 리버스 매도
매도포지션 일때 상기준 상향돌파시 리버스매수
---------------------------------------------
포지션이 없을때 지수가 하기준을 하향돌파하면 "매도" 하기준-1틱 터치후 올라오면 상기준과 하기준 정중간에서 리버스 매수
매수포지션 일때 하기준 하향돌파시 리버스매도
손절 8틱
익절 10틱
손절이나 익절후에는 다음 상기준,하기준 나타날때 까지 진입금지 입니다
답변 1
예스스탁 예스스탁 답변
2012-03-07 11:18:11
안녕하세요
예스스탁입니다.
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 10{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if var1 > (길이-1) and var1 <= 길이 Then{
if MarketPosition == 0 and count == 0 and crossup(c,상기준) Then
buy();
if MarketPosition == 0 and count == 0 and crossup(c,하기준) Then
sell();
if MarketPosition == 0 and count > 0 and (IsExitName("bx",1) or IsExitName("sx",1)) and crossup(c,상기준) Then
buy();
if MarketPosition == 0 and count > 0 and (IsExitName("bx",1) or IsExitName("sx",1)) and crossup(c,하기준) Then
sell();
if MarketPosition == 0 and count == 0 and (IsExitName("StopLoss",1) or IsExitName("StopProfittarget",1)) and
상기준 != 상기준[BarsSinceEntry(1)] and crossup(c,상기준) Then
buy();
if MarketPosition == 0 and count == 0 and (IsExitName("StopLoss",1) or IsExitName("StopProfittarget",1)) and
하기준 != 하기준[BarsSinceEntry(1)] and crossup(c,하기준) Then
sell();
}
if MarketPosition == 1 and CrossDown(c,(상기준+하기준)/2) Then
exitlong("bx");
if MarketPosition == -1 and Crossup(c,(상기준+하기준)/2) Then
ExitShort("sx");
SetStopLoss(PriceScale*8,PointStop);
SetStopProfittarget(PriceScale*10,PointStop);
즐거운 하루되세요
> leekss1 님이 쓴 글입니다.
> 제목 : 수식부탁드립니다--
> if var1 > (길이-1) and var1 <= 길이 Then{
plot1(상기준,"1",WHITE);
plot2(하기준,"2",WHITE);
}
위 지표식을 시스템식으로 바꿔서
포지션이 없을때 지수가 상기준을 상향돌파하면 "매수" 상기준+1틱 터치후 내려오면 상기준과 하기준 정중간에서 리버스 매도
매도포지션 일때 상기준 상향돌파시 리버스매수
---------------------------------------------
포지션이 없을때 지수가 하기준을 하향돌파하면 "매도" 하기준-1틱 터치후 올라오면 상기준과 하기준 정중간에서 리버스 매수
매수포지션 일때 하기준 하향돌파시 리버스매도
손절 8틱
익절 10틱
손절이나 익절후에는 다음 상기준,하기준 나타날때 까지 진입금지 입니다