커뮤니티
[STAD_03] Buy Bips-Sell Rallies
2014-03-19 09:51:28
126
글번호 73611
Input: RSILen(200), RSILevel(50), DMILen(100), ARmult(2), Div(40);
Vars: UpTrend(False), DnTrend(False), DMISpread(0), MP(0), StopPrice(0), BuySetup(False), SellSetup(False), LongEntryPrice(0), ShortEntryPrice(0);
UpTrend = RSI(RSILen) >= RSILevel;
DnTrend = RSI(RSILEn) < RSILevel;
DMISpread = DIPlus(DMILen) - DIMinus(DMILen);
If UpTrend == true and DMISpread < 0 then {
BuySetup = True;
SellSetup = False;
}
--------------------------------------------------------
Else
buysetup = false;
------------------------------------------------
질문1 이부분이 왜들어갔는지 궁금합니다
질문2 이부분을 if uptrend == false and dmispread >= 0 then buysetup = false;
이렇게 바꿔도 되나요?
If DNTrend == true and DMISpread > 0 then {
SellSetup = True;
BuySetup = False;
}
Else
sellsetup = false;
If EntriesToday(date) < 1 Then {
-----------------------------------------------------
If BuySetup == true then {
If BuySetup[1] == False then
------------------------------------------------------
질문3 이부분을 이렇게 해석해야 하나요?
buysetup 을 만족하고 직전봉에선 buysetup을 만족하지 못했을때
즉 buysetup을 만족하는 첫 봉일때
LongEntryprice = High;
Buy("매수",AtStop,LongEntryPrice);
}
If SellSetup == True then {
If SellSetup[1] == False then
ShortEntryPrice = Low;
Sell("매도",AtStop, ShortEntryprice);
}
}
MP = MarketPosition();
If MP == 1 and MP[1] <> 1 then
StopPrice = Low - MA(Range,40)*ARmult;
If MP == -1 and MP[1] <> -1 then
StopPrice = High + MA(Range,40)*ARmult;
If MP == 1 then {
Exitlong("매수청산", atStop, StopPrice);
StopPrice = StopPrice + (Low - StopPrice)/div;
}
If MP == -1 then {
Exitshort("매도청산",AtStop, StopPrice);
StopPrice = StopPrice - (StopPrice - High)/div;
}
setstoploss(1.5);
SetStopEndofday(1500);
부탁드립니다
답변 1
예스스탁 예스스탁 답변
2014-03-19 16:42:30
안녕하세요
예스스탁입니다.
1.
UPtrend가 true가 아니게 되거나
DMISpread 가 0보다 작지 않으면 매수조건을 해제한다는 내용입니다.
죽 2개의 조건이 동시에 만족되지 않으면 매수진입 셋업을 해제하겠다는 내용입니다.
2.
If UpTrend == true and DMISpread < 0 then
위 조건이 아닌 경우이므로
UpTrend 가 false이거나 DMISpread 가 0이상인 경우입니다. and로 엮으면 안됩니다.
if uptrend == false or dmispread >= 0 then buysetup = false;
로 하셔야 합니다.
3
예 해석하신 내용이 맞습니다.
즐거운 하루되세요
> cinamon 님이 쓴 글입니다.
> 제목 : [STAD_03] Buy Bips-Sell Rallies
> Input: RSILen(200), RSILevel(50), DMILen(100), ARmult(2), Div(40);
Vars: UpTrend(False), DnTrend(False), DMISpread(0), MP(0), StopPrice(0), BuySetup(False), SellSetup(False), LongEntryPrice(0), ShortEntryPrice(0);
UpTrend = RSI(RSILen) >= RSILevel;
DnTrend = RSI(RSILEn) < RSILevel;
DMISpread = DIPlus(DMILen) - DIMinus(DMILen);
If UpTrend == true and DMISpread < 0 then {
BuySetup = True;
SellSetup = False;
}
--------------------------------------------------------
Else
buysetup = false;
------------------------------------------------
질문1 이부분이 왜들어갔는지 궁금합니다
질문2 이부분을 if uptrend == false and dmispread >= 0 then buysetup = false;
이렇게 바꿔도 되나요?
If DNTrend == true and DMISpread > 0 then {
SellSetup = True;
BuySetup = False;
}
Else
sellsetup = false;
If EntriesToday(date) < 1 Then {
-----------------------------------------------------
If BuySetup == true then {
If BuySetup[1] == False then
------------------------------------------------------
질문3 이부분을 이렇게 해석해야 하나요?
buysetup 을 만족하고 직전봉에선 buysetup을 만족하지 못했을때
즉 buysetup을 만족하는 첫 봉일때
LongEntryprice = High;
Buy("매수",AtStop,LongEntryPrice);
}
If SellSetup == True then {
If SellSetup[1] == False then
ShortEntryPrice = Low;
Sell("매도",AtStop, ShortEntryprice);
}
}
MP = MarketPosition();
If MP == 1 and MP[1] <> 1 then
StopPrice = Low - MA(Range,40)*ARmult;
If MP == -1 and MP[1] <> -1 then
StopPrice = High + MA(Range,40)*ARmult;
If MP == 1 then {
Exitlong("매수청산", atStop, StopPrice);
StopPrice = StopPrice + (Low - StopPrice)/div;
}
If MP == -1 then {
Exitshort("매도청산",AtStop, StopPrice);
StopPrice = StopPrice - (StopPrice - High)/div;
}
setstoploss(1.5);
SetStopEndofday(1500);
부탁드립니다