커뮤니티

수식 추가 여쭤봅니다~

프로필 이미지
부자청년28
2019-07-08 14:32:40
151
글번호 130166
답변완료
당일 1회 매수시 물량정리되고 재매수 금지 추가 하고 싶습니다 하루에 한번 매수가 일어나게 하고 싶습니다~ 감사합니당 input : sto1(10),sto2(5),금액(10000000); var : stok(0),stod(0), count(0); stok = StochasticsK(sto1,sto2); if MarketPosition == 0 and stime >= 90000 and stime < 100000 and CrossDown(stok,20) Then buy("b",OnClose,DEF,Floor(금액/c)); if MarketPosition == 1 Then { if crossup(stok,80) then ExitLong("bx1",atlimit,EntryPrice*1.03,"",Floor(CurrentContracts*0.70),1); ExitLong("bp1",atlimit,EntryPrice*1.03,"",Floor(CurrentContracts*0.70),1); ExitLong("bp2",atlimit,EntryPrice*1.06); if highest(H,BarsSinceEntry) >= EntryPrice*1.03 Then ExitLong("bx2",AtStop,EntryPrice*1.01); ExitLong("bl1",AtStop,EntryPrice*0.97,"",Floor(CurrentContracts*0.70),1); ExitLong("bl2",AtStop,EntryPrice*0.95); } SetStopEndofday(152000);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-07-08 14:35:30

안녕하세요 예스스탁입니다. input : sto1(10),sto2(5),금액(10000000); var : stok(0),stod(0), count(0),entry(0); stok = StochasticsK(sto1,sto2); if bdate != bdate[1] Then entry = 0; if MarketPosition(0) != 0 and MarketPosition(0) != MarketPosition(0)[1] Then entry = entry+1; if entry < 1 and MarketPosition == 0 and stime >= 90000 and stime < 100000 and CrossDown(stok,20) Then buy("b",OnClose,DEF,Floor(금액/c)); if MarketPosition == 1 Then { if crossup(stok,80) then ExitLong("bx1",atlimit,EntryPrice*1.03,"",Floor(CurrentContracts*0.70),1); ExitLong("bp1",atlimit,EntryPrice*1.03,"",Floor(CurrentContracts*0.70),1); ExitLong("bp2",atlimit,EntryPrice*1.06); if highest(H,BarsSinceEntry) >= EntryPrice*1.03 Then ExitLong("bx2",AtStop,EntryPrice*1.01); ExitLong("bl1",AtStop,EntryPrice*0.97,"",Floor(CurrentContracts*0.70),1); ExitLong("bl2",AtStop,EntryPrice*0.95); } SetStopEndofday(152000); 즐거운 하루되세요 > 부자청년28 님이 쓴 글입니다. > 제목 : 수식 추가 여쭤봅니다~ > 당일 1회 매수시 물량정리되고 재매수 금지 추가 하고 싶습니다 하루에 한번 매수가 일어나게 하고 싶습니다~ 감사합니당 input : sto1(10),sto2(5),금액(10000000); var : stok(0),stod(0), count(0); stok = StochasticsK(sto1,sto2); if MarketPosition == 0 and stime >= 90000 and stime < 100000 and CrossDown(stok,20) Then buy("b",OnClose,DEF,Floor(금액/c)); if MarketPosition == 1 Then { if crossup(stok,80) then ExitLong("bx1",atlimit,EntryPrice*1.03,"",Floor(CurrentContracts*0.70),1); ExitLong("bp1",atlimit,EntryPrice*1.03,"",Floor(CurrentContracts*0.70),1); ExitLong("bp2",atlimit,EntryPrice*1.06); if highest(H,BarsSinceEntry) >= EntryPrice*1.03 Then ExitLong("bx2",AtStop,EntryPrice*1.01); ExitLong("bl1",AtStop,EntryPrice*0.97,"",Floor(CurrentContracts*0.70),1); ExitLong("bl2",AtStop,EntryPrice*0.95); } SetStopEndofday(152000);