커뮤니티
수식 추가 부탁드립니다.
2009-12-23 12:24:46
728
글번호 26905
아래 식에 추가로
*"전일 종가 대비 당일 시가가 5%이상일 때에는 매수하지 않음" 을 추가해 주십시요.
즉, 당일 상승이 5%이상되면, 매수하지 않습니다.
감사합니다.
------------------------------------
var : Pcount(0),ENTRY(0);
Pcount = 0;
ENTRY = 0;
for var1 = 0 to 20{
if sDate == EntryDate(var1) Then
ENTRY = ENTRY+1;
if sDate == ExitDate(var1) and IsExitName("StopProfittarget",var1) Then
Pcount = Pcount+1;
}
if MarketPosition == 0 and Pcount == 0 and ENTRY == 0 Then
buy("b",AtStop,DayHigh(1)+PriceScale);
if MarketPosition == 1 Then
exitlong("bx",AtStop,DayLow(1)-PriceScale);
SetStopProfittarget(30);
답변 1
예스스탁 예스스탁 답변
2009-12-23 13:47:52
안녕하세요
예스스탁입니다.
var : Pcount(0),ENTRY(0);
Pcount = 0;
ENTRY = 0;
for var1 = 0 to 20{
if sDate == EntryDate(var1) Then
ENTRY = ENTRY+1;
if sDate == ExitDate(var1) and IsExitName("StopProfittarget",var1) Then
Pcount = Pcount+1;
}
if MarketPosition == 0 and Pcount == 0 and ENTRY == 0 and DayOpen < DayClose(1)*1.05 Then
buy("b",AtStop,DayHigh(1)+PriceScale);
if MarketPosition == 1 Then
exitlong("bx",AtStop,DayLow(1)-PriceScale);
SetStopProfittarget(30);
즐거운 하루되세요
> 쌀사비팔 님이 쓴 글입니다.
> 제목 : 수식 추가 부탁드립니다.
> 아래 식에 추가로
*"전일 종가 대비 당일 시가가 5%이상일 때에는 매수하지 않음" 을 추가해 주십시요.
즉, 당일 상승이 5%이상되면, 매수하지 않습니다.
감사합니다.
------------------------------------
var : Pcount(0),ENTRY(0);
Pcount = 0;
ENTRY = 0;
for var1 = 0 to 20{
if sDate == EntryDate(var1) Then
ENTRY = ENTRY+1;
if sDate == ExitDate(var1) and IsExitName("StopProfittarget",var1) Then
Pcount = Pcount+1;
}
if MarketPosition == 0 and Pcount == 0 and ENTRY == 0 Then
buy("b",AtStop,DayHigh(1)+PriceScale);
if MarketPosition == 1 Then
exitlong("bx",AtStop,DayLow(1)-PriceScale);
SetStopProfittarget(30);
다음글