커뮤니티

수정부탁드립니다.

프로필 이미지
대구어린울프
2020-05-12 11:10:06
1533
글번호 138789
답변완료
안녕하세요? 아래수식에 하루매매횟수를 넣고싶습니다. input : 진입횟수(1); var : entry(1); 여기까지는 했는데, entry < 진입횟수 and 이부분을 제가 지식이 짧아 아래수식에는 적용하지를 못하겠네요. 도와주시면 감사하겠습니다. Input : 손절 (1), 익절 (1), 틱 (1); var : plusF(0), isToBuy(False), isToSell(False), length(0), entryIdx(0); var : isTodayEntered(False); if sTime == 90000 then isTodayEntered = False; length = c - o; isToBuy = length == 틱 * PriceScale; isToSell = length == -1 * 틱 * PriceScale; if MarketPosition == 0 then { if isToBuy and !isTodayEntered then { Buy("수진"); isTodayEntered = True; entryIdx = Index; } else if isToSell and !isTodayEntered then { Sell("도진"); isTodayEntered = True; entryIdx = Index; } } else if MarketPosition == 1 then { if entryIdx == Index[1] and isToSell then { Sell("수청도역진"); } } else if MarketPosition == -1 then { if entryIdx == Index[1] and isToBuy then { Buy("도청수역진"); } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-05-12 13:50:12

안녕하세요 예스스탁입니다. Input : 손절 (1), 익절 (1), 틱 (1); input : 진입횟수(1); var : entry(0); var : plusF(0), isToBuy(False), isToSell(False), length(0), entryIdx(0); var : isTodayEntered(False); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if sTime == 90000 then isTodayEntered = False; length = c - o; isToBuy = length == 틱 * PriceScale; isToSell = length == -1 * 틱 * PriceScale; if MarketPosition == 0 then { if isToBuy and !isTodayEntered and entry < 진입횟수 then { Buy("수진"); isTodayEntered = True; entryIdx = Index; } if isToSell and !isTodayEntered and entry < 진입횟수 then { Sell("도진"); isTodayEntered = True; entryIdx = Index; } } else if MarketPosition == 1 then { if entryIdx == Index[1] and isToSell and entry < 진입횟수 then { Sell("수청도역진"); } } else if MarketPosition == -1 then { if entryIdx == Index[1] and isToBuy and entry < 진입횟수 then { Buy("도청수역진"); } } 즐거운 하루되세요 > 대구어린울프 님이 쓴 글입니다. > 제목 : 수정부탁드립니다. > 안녕하세요? 아래수식에 하루매매횟수를 넣고싶습니다. input : 진입횟수(1); var : entry(1); 여기까지는 했는데, entry < 진입횟수 and 이부분을 제가 지식이 짧아 아래수식에는 적용하지를 못하겠네요. 도와주시면 감사하겠습니다. Input : 손절 (1), 익절 (1), 틱 (1); var : plusF(0), isToBuy(False), isToSell(False), length(0), entryIdx(0); var : isTodayEntered(False); if sTime == 90000 then isTodayEntered = False; length = c - o; isToBuy = length == 틱 * PriceScale; isToSell = length == -1 * 틱 * PriceScale; if MarketPosition == 0 then { if isToBuy and !isTodayEntered then { Buy("수진"); isTodayEntered = True; entryIdx = Index; } else if isToSell and !isTodayEntered then { Sell("도진"); isTodayEntered = True; entryIdx = Index; } } else if MarketPosition == 1 then { if entryIdx == Index[1] and isToSell then { Sell("수청도역진"); } } else if MarketPosition == -1 then { if entryIdx == Index[1] and isToBuy then { Buy("도청수역진"); } }