커뮤니티
손절점을 기준으로 재설정할려구요 검토부탁드려요
2010-12-15 14:57:59
678
글번호 34354
손절점을 기준으로 재설정할려구요 검토부탁드려요,손절난부분을
isexitname 과 exitprice(1) 로 하고 재진입식으로 해볼려고 햇는데
안되네여 검토 부탁드립니다
Input : root1(260),OK(1),n1(0.5),n2(0.5),count(100),nn1(0.5),nn2(0.5);
Var : cnt(0),entriestoday(0);
if OK == 1 then
var1 = root1;
entriestoday = 0;
For cnt = 0 to 10
{
If sDate == EntryDate() Then
entriestoday = entriestoday+1;
}
If MarketPosition == 0 and OK== 1 and L > var1 - n1 and entriestoday < count and IsExitName("첫번째바이손실1") == False Then
Buy("첫번재바이1",atlimit,root1-n1);
If MarketPosition == 0 and OK==1 and H <var1 + n2 and entriestoday < count and IsExitName("첫번째셀손실1") ==False Then
Sell("첫번째셀1",AtLimit,root1+n2);
If MarketPosition == 1 Then
ExitLong("첫번째바이이익1",AtLimit,EntryPrice+nn1);
If MarketPosition == 1 Then
ExitLong("첫번째바이손실1",AtStop, (EntryPrice-nn1));
If MarketPosition == -1 Then
ExitShort("첫번째셀이익1",atlimit,EntryPrice-nn2);
If MarketPosition ==-1 Then
ExitShort("첫번째셀손실1",AtStop, (EntryPrice+nn2));
If MarketPosition == 0 and IsExitName("첫번째바이손실1") == True and L > ExitPrice(1) - n1 and entriestoday < count Then
Buy("두번재바이2",atlimit,ExitPrice(1)-n1);
If MarketPosition == 0 and IsExitName("첫번째셀손실1") ==true and H < ExitPrice(1) +n2 and entriestoday < count Then
Sell("두번째셀2",AtLimit,ExitPrice(1)+n2);
- 1. 34628_CurrentChart.jpg (0.17 MB)
답변 1
예스스탁 예스스탁 답변
2010-12-16 09:34:43
안녕하세요
1시 이후에 전화 주시기 바랍니다.
즐거운 하루되세요
> 따불 님이 쓴 글입니다.
> 제목 : 손절점을 기준으로 재설정할려구요 검토부탁드려요
> 손절점을 기준으로 재설정할려구요 검토부탁드려요,손절난부분을
isexitname 과 exitprice(1) 로 하고 재진입식으로 해볼려고 햇는데
안되네여 검토 부탁드립니다
Input : root1(260),OK(1),n1(0.5),n2(0.5),count(100),nn1(0.5),nn2(0.5);
Var : cnt(0),entriestoday(0);
if OK == 1 then
var1 = root1;
entriestoday = 0;
For cnt = 0 to 10
{
If sDate == EntryDate() Then
entriestoday = entriestoday+1;
}
If MarketPosition == 0 and OK== 1 and L > var1 - n1 and entriestoday < count and IsExitName("첫번째바이손실1") == False Then
Buy("첫번재바이1",atlimit,root1-n1);
If MarketPosition == 0 and OK==1 and H <var1 + n2 and entriestoday < count and IsExitName("첫번째셀손실1") ==False Then
Sell("첫번째셀1",AtLimit,root1+n2);
If MarketPosition == 1 Then
ExitLong("첫번째바이이익1",AtLimit,EntryPrice+nn1);
If MarketPosition == 1 Then
ExitLong("첫번째바이손실1",AtStop, (EntryPrice-nn1));
If MarketPosition == -1 Then
ExitShort("첫번째셀이익1",atlimit,EntryPrice-nn2);
If MarketPosition ==-1 Then
ExitShort("첫번째셀손실1",AtStop, (EntryPrice+nn2));
If MarketPosition == 0 and IsExitName("첫번째바이손실1") == True and L > ExitPrice(1) - n1 and entriestoday < count Then
Buy("두번재바이2",atlimit,ExitPrice(1)-n1);
If MarketPosition == 0 and IsExitName("첫번째셀손실1") ==true and H < ExitPrice(1) +n2 and entriestoday < count Then
Sell("두번째셀2",AtLimit,ExitPrice(1)+n2);
다음글
이전글