커뮤니티
기준선 재설정후 반복매매입니다. 검토부탁드립니다.
2010-12-14 11:38:10
685
글번호 34309
/*기준선설정후 일정범위 상승이면 셀
하락이면 바이
손실이나면 청산가격이 기준선으로 재설정 */
input : root1(262),n1(0.5),n2(0.5),num(1),choice(1),losscut(0.5);
Var : entriestoday(0),cnt(0);
entriestoday =0;
for cnt = 0 to 10{
if sdate == entrydate(cnt) Then
entriestoday=entriestoday+1;
}
If choice == 1 Then
var1= root1 ;
if marketposition == 0 and choice == 1 and l >var1-n1 and entriestoday < num then
buy("b1",atlimit,root1- n1);
if marketposition == 0 and choice == 1 and h < var1+n1 and entriestoday < num then
sell("s1",atlimit,root1 +n2);
if marketposition == 1 and entriestoday < num then
exitlong("EL1",atlimit,var1-(currententries*n1)+n1);
if marketposition == -1 and entriestoday < num then
exitshort("es1",atlimit,var1+(currententries*n2)-n2);
if marketposition ==1 or -1 and MaxPositionLoss >= losscut Then
exitlong("바이정리1");
ExitShort("셀정리1");
If IsExitName("바이정리1") ==true Then
var1= ExitPrice ;
- 1. 기준선재설정.jpg (0.15 MB)
답변 2
예스스탁 예스스탁 답변
2010-12-14 12:56:43
안녕하세요
예스스탁입니다.
첫진입후에 다음 진입은 청산가격을 기준으로 발생하게 변경했습니다.
input : root1(262),n1(0.5),n2(0.5),num(1),choice(1),losscut(0.5);
Var : entriestoday(0),cnt(0);
entriestoday = 0;
for cnt = 0 to 10{
if sdate == entrydate(cnt) Then
entriestoday=entriestoday+1;
}
If choice == 1 Then
var1= root1 ;
if entriestoday < 1 Then{
if marketposition == 0 and choice == 1 and l >var1-n1 and entriestoday < num then
buy("b1",atlimit,root1- n1);
if marketposition == 0 and choice == 1 and h < var1+n1 and entriestoday < num then
sell("s1",atlimit,root1 +n2);
}
if entriestoday >= 1 Then{
if marketposition == 0 and choice == 1 and l >var1-n1 and entriestoday < num then
buy("b11",atlimit,ExitPrice(1)-n1);
if marketposition == 0 and choice == 1 and h < var1+n1 and entriestoday < num then
sell("s11",atlimit,ExitPrice(1)+n2);
}
if marketposition == 1 and entriestoday < num then
exitlong("EL1",atlimit,var1-(currententries*n1)+n1);
if marketposition == -1 and entriestoday < num then
exitshort("es1",atlimit,var1+(currententries*n2)-n2);
if marketposition ==1 or -1 and MaxPositionLoss >= losscut Then{
exitlong("바이정리1");
ExitShort("셀정리1");
}
If IsExitName("바이정리1") ==true Then
var1= ExitPrice ;
즐거운 하루되세요
> 따불 님이 쓴 글입니다.
> 제목 : 기준선 재설정후 반복매매입니다. 검토부탁드립니다.
>
/*기준선설정후 일정범위 상승이면 셀
하락이면 바이
손실이나면 청산가격이 기준선으로 재설정 */
input : root1(262),n1(0.5),n2(0.5),num(1),choice(1),losscut(0.5);
Var : entriestoday(0),cnt(0);
entriestoday =0;
for cnt = 0 to 10{
if sdate == entrydate(cnt) Then
entriestoday=entriestoday+1;
}
If choice == 1 Then
var1= root1 ;
if marketposition == 0 and choice == 1 and l >var1-n1 and entriestoday < num then
buy("b1",atlimit,root1- n1);
if marketposition == 0 and choice == 1 and h < var1+n1 and entriestoday < num then
sell("s1",atlimit,root1 +n2);
if marketposition == 1 and entriestoday < num then
exitlong("EL1",atlimit,var1-(currententries*n1)+n1);
if marketposition == -1 and entriestoday < num then
exitshort("es1",atlimit,var1+(currententries*n2)-n2);
if marketposition ==1 or -1 and MaxPositionLoss >= losscut Then
exitlong("바이정리1");
ExitShort("셀정리1");
If IsExitName("바이정리1") ==true Then
var1= ExitPrice ;
회원
2012-02-27 08:50:50
관리자님에 의해 삭제된 답변입니다.
이전글