커뮤니티
일정시간에만 조건부여
2007-10-22 15:35:25
1035
글번호 13836
var : ForceIndex(0),period(0);
ForceIndex = EMA(dayvolume()*(dayclose()-dayclose()[1]), period);
if
crossup(C,ma(C,5)) and ForceIndex >0
then
buy("매수");
###################################################################
위식에서 ForceIndex지표가 아침 9시에서 9시30분사이에
10 이하일경우에만 그날 매수신호를 발생시키고 싶습니다.
즉 ForceIndex지표가 아침 30분간만 10 이하를 유지할경우
당일 매수신호를 발생시키고 아침 30분간 10 이하가 안될경우
그날은 매매를 하지않는걸로 하고싶습니다..
if Forceindex < 10 and stime > 090000 and stime < 093000 then var1 =C;
이런식으로 하는것같은데.....^^;;
부탁드립니다.
좋은하루 되세요
답변 1
예스스탁 예스스탁 답변
2007-10-23 11:15:28
안녕하세요
예스스탁입니다.
var : ForceIndex(0),period(0),flag(0);
if date != date[1] Then
flag = 0;
ForceIndex = EMA(dayvolume()*(dayclose()-dayclose()[1]), period);
if Stime == 93000 and Accumn(iff(forceindex <= 10,1,0),30/barinterval)[1] == 30/BarInterval Then{
flag = 1;
}
if 진입식 and flag == 1 Then
buy();
즐거운 하루되세요
> 봉다리 님이 쓴 글입니다.
> 제목 : 일정시간에만 조건부여
> var : ForceIndex(0),period(0);
ForceIndex = EMA(dayvolume()*(dayclose()-dayclose()[1]), period);
if
crossup(C,ma(C,5)) and ForceIndex >0
then
buy("매수");
###################################################################
위식에서 ForceIndex지표가 아침 9시에서 9시30분사이에
10 이하일경우에만 그날 매수신호를 발생시키고 싶습니다.
즉 ForceIndex지표가 아침 30분간만 10 이하를 유지할경우
당일 매수신호를 발생시키고 아침 30분간 10 이하가 안될경우
그날은 매매를 하지않는걸로 하고싶습니다..
if Forceindex < 10 and stime > 090000 and stime < 093000 then var1 =C;
이런식으로 하는것같은데.....^^;;
부탁드립니다.
좋은하루 되세요