커뮤니티

ttime 진입/delaytime buyprice 체크

프로필 이미지
목마와숙녀
2020-01-20 09:06:41
170
글번호 134683
답변완료
입력한 시간대에 진입하는 수식에다 delaytime을 적용해보았는데 결과가 나오지 않습니다. 시간대로 진입하는 것도 buyprice를 체크할 수 있다면 가능하다고 보았는데요. ********************************************************************************* input : ntime(090100),n(1); input : delaytime(0); input : range1(0.00),range2(1.20); var : BuySetup(false),Buyprice(0),BD(0),BT(0), LL(0); if MarketPosition <= 0 and BuySetup == false and stime == ntime or (stime > ntime and stime[1] < ntime) Then { if MaxEntries < n Then { BuySetup = true; Buyprice = C; BD = sdate; BT = TimeToMinutes(stime); LL = L; } if BuySetup == true and L < LL Then LL = L; if MarketPosition == 1 Then BuySetup = false; if MarketPosition <= 0 and BuySetup == true and Sdate == BD and TimeToMinutes(stime) >= BT+delaytime and crossup(c,BuyPrice) and LL <= BuyPrice-range1 and LL >= BuyPrice-range2 Then buy("b"); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-12-27 15:12:09

안녕하세요 예스스탁입니다. 제일 상단의 if문이 9시 1분입니다. 9시 1분 조건에 포함되게 if문이 있어 TimeToMinutes(stime) >= BT+delaytime 조건이 충족하지 않습니다. 해당 if문 밖에 진입식을 위치해야 합니다. input : ntime(090100),n(1); input : delaytime(0); input : range1(0.00),range2(1.20); var : BuySetup(false),Buyprice(0),BD(0),BT(0), LL(0); if MarketPosition <= 0 and BuySetup == false and stime == ntime or (stime > ntime and stime[1] < ntime) Then { if MaxEntries < n Then { BuySetup = true; Buyprice = C; BD = sdate; BT = TimeToMinutes(stime); LL = L; } if BuySetup == true and L < LL Then LL = L; if MarketPosition == 1 Then BuySetup = false; } if MarketPosition <= 0 and BuySetup == true and Sdate == BD and TimeToMinutes(stime) >= BT+delaytime and crossup(c,BuyPrice) and LL <= BuyPrice-range1 and LL >= BuyPrice-range2 Then buy("b"); 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 입력한 시간대에 진입하는 수식에다 delaytime을 적용해보았는데 결과가 나오지 않습니다. 시간대로 진입하는 것도 buyprice를 체크할 수 있다면 가능하다고 보았는데요. ********************************************************************************* input : ntime(090100),n(1); input : delaytime(0); input : range1(0.00),range2(1.20); var : BuySetup(false),Buyprice(0),BD(0),BT(0), LL(0); if MarketPosition <= 0 and BuySetup == false and stime == ntime or (stime > ntime and stime[1] < ntime) Then { if MaxEntries < n Then { BuySetup = true; Buyprice = C; BD = sdate; BT = TimeToMinutes(stime); LL = L; } if BuySetup == true and L < LL Then LL = L; if MarketPosition == 1 Then BuySetup = false; if MarketPosition <= 0 and BuySetup == true and Sdate == BD and TimeToMinutes(stime) >= BT+delaytime and crossup(c,BuyPrice) and LL <= BuyPrice-range1 and LL >= BuyPrice-range2 Then buy("b"); }