커뮤니티
부탁해요
2014-07-11 13:59:37
143
글번호 76635
if CrossUp(c,r1) and stime >= 093000 and stime <= 150000 and c>=fr[2] Then
buy("매수1");
if CrossUp(c,r2) and stime >= 093000 and stime <= 150000 and c>=fr[2] Then
buy("매수2");
if CrossUp(c,r3) and stime >= 093000 and stime <= 150000 and c>=fr[2] Then
buy("매수3");
if CrossDown(c,s1) and stime >= 093000 and stime <= 150000 and c<=fr[4] Then
Sell("매도1");
if CrossDown(c,s2) and stime >= 093000 and stime <= 150000 and c<=fr[4] Then
Sell("매도2");
if CrossDown(c,s3) and stime >= 093000 and stime <= 150000 and c<=fr[4] Then
Sell("매도3");
위의 식을 9시30분이후에 새로이 시작되는 fr[2]/fr[4]값을 현재가가 크거나 작을때 위의
식이 적용되도록 하고싶습니다...
다시말해서 9시30분에 현재 진행되고 있는 fr[2]/fr[4]값은 무시하고 새로이 만들어지는
fr[2]/fr[4]값이 생성되었을때 위의 식이 적용되도록 하는것입니다,,,
부탁드립니다,,
답변 1
예스스탁 예스스탁 답변
2014-07-11 17:33:53
안녕하세요
예스스탁입니다.
if date != date[1] Then{
Condition1 = false;
Condition2 = false;
}
#9시 30분 이후에 Fr[2] 값이 한번 변동이 있으면 true
if stime >= 93000 and Fr[2] != Fr[2][1] Then
Condition1 = true;
#9시 30분 이후에 Fr[4] 값이 한번 변동이 있으면 true
if stime >= 93000 and Fr[4] != Fr[4][1] Then
Condition2 = true;
if Condition1 == true then{
if CrossUp(c,r1) and stime >= 093000 and stime <= 150000 and c>=fr[2] Then
buy("매수1");
if CrossUp(c,r2) and stime >= 093000 and stime <= 150000 and c>=fr[2] Then
buy("매수2");
if CrossUp(c,r3) and stime >= 093000 and stime <= 150000 and c>=fr[2] Then
buy("매수3");
}
if Condition2 == true then{
if CrossDown(c,s1) and stime >= 093000 and stime <= 150000 and c<=fr[4] Then
Sell("매도1");
if CrossDown(c,s2) and stime >= 093000 and stime <= 150000 and c<=fr[4] Then
Sell("매도2");
if CrossDown(c,s3) and stime >= 093000 and stime <= 150000 and c<=fr[4] Then
Sell("매도3");
}
즐거운 하루되세요
> 오동도물개 님이 쓴 글입니다.
> 제목 : 부탁해요
> if CrossUp(c,r1) and stime >= 093000 and stime <= 150000 and c>=fr[2] Then
buy("매수1");
if CrossUp(c,r2) and stime >= 093000 and stime <= 150000 and c>=fr[2] Then
buy("매수2");
if CrossUp(c,r3) and stime >= 093000 and stime <= 150000 and c>=fr[2] Then
buy("매수3");
if CrossDown(c,s1) and stime >= 093000 and stime <= 150000 and c<=fr[4] Then
Sell("매도1");
if CrossDown(c,s2) and stime >= 093000 and stime <= 150000 and c<=fr[4] Then
Sell("매도2");
if CrossDown(c,s3) and stime >= 093000 and stime <= 150000 and c<=fr[4] Then
Sell("매도3");
위의 식을 9시30분이후에 새로이 시작되는 fr[2]/fr[4]값을 현재가가 크거나 작을때 위의
식이 적용되도록 하고싶습니다...
다시말해서 9시30분에 현재 진행되고 있는 fr[2]/fr[4]값은 무시하고 새로이 만들어지는
fr[2]/fr[4]값이 생성되었을때 위의 식이 적용되도록 하는것입니다,,,
부탁드립니다,,