커뮤니티
시스템식 여쭤봅니다~~
2019-07-09 11:25:45
255
글번호 130193
둘다 침체구역에 있을시 매수
아래의 수식에서
Rsi 침체진입을 만족할때 매수를 추가하고싶습니다
아래는 스토캐스틱 조건만있는데
스토캐스틱조건 에 더해서 RSI가 침체진입이 동시에 만족할때 매수
감사합니다
Rsi 역시 변수로 설정하고 싶습니다
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);
답변 1
예스스탁 예스스탁 답변
2019-07-09 14:43:35
안녕하세요
예스스탁입니다.
input : sto1(10),sto2(5),금액(10000000),RSIPeriod(9),침체(30);
var : stok(0),stod(0), count(0),entry(0),RSIv(0);
stok = StochasticsK(sto1,sto2);
RSIv = RSI(RSIPeriod);
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) and
RSIv < 침체 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 님이 쓴 글입니다.
> 제목 : 시스템식 여쭤봅니다~~
> 둘다 침체구역에 있을시 매수
아래의 수식에서
Rsi 침체진입을 만족할때 매수를 추가하고싶습니다
아래는 스토캐스틱 조건만있는데
스토캐스틱조건 에 더해서 RSI가 침체진입이 동시에 만족할때 매수
감사합니다
Rsi 역시 변수로 설정하고 싶습니다
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);
이전글