커뮤니티

수식수정

프로필 이미지
바나
2021-11-08 16:24:57
1146
글번호 153460
답변완료
코인기준으로 수정부탁드립니다. 첫매수 진입을 9시가 되면 동시에 매수진행하고 9시 시작가를 깨면 손절. 두번째와 세번째 진입은 현재식과 같이 동일하게 진행 아래는 현재 수식입니다. input : 금액(3000000); var : idx(0),entry(0); var : HH(0),Bxcond(false); if Bdate != Bdate[1] Then { idx = 0; entry = 0; } idx = idx+1; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition == 0 Then { if (Bdate != Bdate[1] and C > DayOpen) or (Bdate == Bdate[1] and CrossUp(c,DayOpen)) Then { if entry < 2 and idx > 2 Then Buy("b",OnClose,DEF,Floor(금액/C)); } } if MarketPosition == 1 Then { ExitLong("bx1",AtLimit,EntryPrice*1.03,"",Floor(MaxContracts*0.2),1); ExitLong("bx2",AtLimit,EntryPrice*1.05,"",Floor(MaxContracts*0.2),1); ExitLong("bx3",AtLimit,EntryPrice*1.07,"",Floor(MaxContracts*0.2),1); ExitLong("bx4",AtLimit,EntryPrice*1.09,"",Floor(MaxContracts*0.2),1); } HH = highest(H,BarsSinceEntry); if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Bx4" Then Bxcond = true; if Bxcond == false and HH >= EntryPrice*1.09 and HH < EntryPrice*1.20 Then ExitLong("Bxs",AtStop,HH-(HH-EntryPrice)*0.2); if C < DayOpen Then ExitLong("bxx");
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-11-10 09:11:19

안녕하세요 예스스탁입니다. 현재 진입이 당일 세번째봉부터 당일 총 2회로 지정되어 있습니다. 첫봉에서도 종가가 시초가보다 높으면 진입하고 총 3회까지 진입하게 수정해 드립니다. input : 금액(3000000); var : idx(0),entry(0); var : HH(0),Bxcond(false); if Bdate != Bdate[1] Then { idx = 0; entry = 0; } idx = idx+1; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition == 0 Then { if (Bdate != Bdate[1] and C > DayOpen) or (Bdate == Bdate[1] and CrossUp(c,DayOpen)) Then { if entry < 3 Then Buy("b",OnClose,DEF,Floor(금액/C)); } } if MarketPosition == 1 Then { ExitLong("bx1",AtLimit,EntryPrice*1.03,"",Floor(MaxContracts*0.2),1); ExitLong("bx2",AtLimit,EntryPrice*1.05,"",Floor(MaxContracts*0.2),1); ExitLong("bx3",AtLimit,EntryPrice*1.07,"",Floor(MaxContracts*0.2),1); ExitLong("bx4",AtLimit,EntryPrice*1.09,"",Floor(MaxContracts*0.2),1); HH = highest(H,BarsSinceEntry); if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Bx4" Then Bxcond = true; if Bxcond == false and HH >= EntryPrice*1.09 and HH < EntryPrice*1.20 Then ExitLong("Bxs",AtStop,HH-(HH-EntryPrice)*0.2); if C < DayOpen Then ExitLong("bxx"); } 즐거운 하루되세요 > 바나 님이 쓴 글입니다. > 제목 : 수식수정 > 코인기준으로 수정부탁드립니다. 첫매수 진입을 9시가 되면 동시에 매수진행하고 9시 시작가를 깨면 손절. 두번째와 세번째 진입은 현재식과 같이 동일하게 진행 아래는 현재 수식입니다. input : 금액(3000000); var : idx(0),entry(0); var : HH(0),Bxcond(false); if Bdate != Bdate[1] Then { idx = 0; entry = 0; } idx = idx+1; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition == 0 Then { if (Bdate != Bdate[1] and C > DayOpen) or (Bdate == Bdate[1] and CrossUp(c,DayOpen)) Then { if entry < 2 and idx > 2 Then Buy("b",OnClose,DEF,Floor(금액/C)); } } if MarketPosition == 1 Then { ExitLong("bx1",AtLimit,EntryPrice*1.03,"",Floor(MaxContracts*0.2),1); ExitLong("bx2",AtLimit,EntryPrice*1.05,"",Floor(MaxContracts*0.2),1); ExitLong("bx3",AtLimit,EntryPrice*1.07,"",Floor(MaxContracts*0.2),1); ExitLong("bx4",AtLimit,EntryPrice*1.09,"",Floor(MaxContracts*0.2),1); } HH = highest(H,BarsSinceEntry); if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Bx4" Then Bxcond = true; if Bxcond == false and HH >= EntryPrice*1.09 and HH < EntryPrice*1.20 Then ExitLong("Bxs",AtStop,HH-(HH-EntryPrice)*0.2); if C < DayOpen Then ExitLong("bxx");