커뮤니티
수식 문의 드립니다.
2017-10-26 19:38:50
151
글번호 113667
if sdate >= 지정일 and
MarketPosition == 0 and
stime == 150000 and C < DayClose(1) and C < O then
Buy("매수",OnClose,def,Floor(매수금액/C));
if MarketPosition == 1 Then
{
if MaxEntries == 5 and C <= AvgEntryPrice*0.75 Then
cond = true;
if stime == 150000 and C < DayClose(1) and C < O and C < AvgEntryPrice then
{
if ((cond == false and MaxEntries >= 1 and MaxEntries < 5) or
(cond == true and MaxEntries >= 5 and MaxEntries < 10)) then
{
Buy("매수1",OnClose,def,Floor(매수금액/C));
}}
if Xcond == false then
ExitLong("매도10",atlimit,AvgEntryPrice*1.10,"",Floor(MaxContracts*0.50),2);
if stime == 150000 and C > DayOpen and C > DayClose(1) and C > AvgEntryPrice*1.03 then
Exitlong("매도03",OnClose,def,"",Floor(MaxContracts*0.20),2);
위 수식은 매수와 매도부분만 발췌하여 올렸습니다.
매수와 매도수식을 30분봉에 적용해 보니
report에는 15:30분에 매수와 매도가 되는 것으로 나오는데요.
실전에서는 아마도 매수와 매도가 안될거 같습니다.
30분봉에 적용하고 오후3시에 매수와 매도가 되게 할수 있는 방법이 없을까요??
고견 부탁드립니다.~~~
답변 1
예스스탁 예스스탁 답변
2017-10-27 13:47:53
안녕하세요
예스스탁입니다.
plot1(stime);
위 지표 적용하시면 봉의 시작시간을 확인하실 수 있습니다.
현재 시간이 150000으로 지정되어 있습니다.
30분 봉이므로 143000으로 변경하시면 됩니다.
if sdate >= 지정일 and MarketPosition == 0 and
stime == 143000 and C < DayClose(1) and C < O then
Buy("매수",OnClose,def,Floor(매수금액/C));
if MarketPosition == 1 Then
{
if MaxEntries == 5 and C <= AvgEntryPrice*0.75 Then
cond = true;
if stime == 143000 and C < DayClose(1) and C < O and C < AvgEntryPrice then
{
if ((cond == false and MaxEntries >= 1 and MaxEntries < 5) or
(cond == true and MaxEntries >= 5 and MaxEntries < 10)) then
{
Buy("매수1",OnClose,def,Floor(매수금액/C));
}}
if Xcond == false then
ExitLong("매도10",atlimit,AvgEntryPrice*1.10,"",Floor(MaxContracts*0.50),2);
if stime == 143000 and C > DayOpen and C > DayClose(1) and C > AvgEntryPrice*1.03 then
Exitlong("매도03",OnClose,def,"",Floor(MaxContracts*0.20),2);
즐거운 하루되세요
> 승부사1 님이 쓴 글입니다.
> 제목 : 수식 문의 드립니다.
> if sdate >= 지정일 and
MarketPosition == 0 and
stime == 150000 and C < DayClose(1) and C < O then
Buy("매수",OnClose,def,Floor(매수금액/C));
if MarketPosition == 1 Then
{
if MaxEntries == 5 and C <= AvgEntryPrice*0.75 Then
cond = true;
if stime == 150000 and C < DayClose(1) and C < O and C < AvgEntryPrice then
{
if ((cond == false and MaxEntries >= 1 and MaxEntries < 5) or
(cond == true and MaxEntries >= 5 and MaxEntries < 10)) then
{
Buy("매수1",OnClose,def,Floor(매수금액/C));
}}
if Xcond == false then
ExitLong("매도10",atlimit,AvgEntryPrice*1.10,"",Floor(MaxContracts*0.50),2);
if stime == 150000 and C > DayOpen and C > DayClose(1) and C > AvgEntryPrice*1.03 then
Exitlong("매도03",OnClose,def,"",Floor(MaxContracts*0.20),2);
위 수식은 매수와 매도부분만 발췌하여 올렸습니다.
매수와 매도수식을 30분봉에 적용해 보니
report에는 15:30분에 매수와 매도가 되는 것으로 나오는데요.
실전에서는 아마도 매수와 매도가 안될거 같습니다.
30분봉에 적용하고 오후3시에 매수와 매도가 되게 할수 있는 방법이 없을까요??
고견 부탁드립니다.~~~
다음글
이전글