예스스탁
예스스탁 답변
2020-03-02 13:04:19
안녕하세요
예스스탁입니다.
input : P(20),dv(2);
var : BBup(0);
BBup = BollBandUp(P,dv);
if MarketPosition == 1 then
{
BuySetup = false;
if countif(CrossDown(CCIv,CCI값),BarsSinceEntry) >= 1 and
CCIv < CCI값 and C < O Then
ExitLong("매수cci청산");
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*즉시익절1 and C < O Then
ExitLong("즉시익절1");
if highest(H,BarsSinceEntry) >= (EntryPrice+PriceScale*즉시익절1*N2) Then
ExitLong("본전청산1",AtStop,EntryPrice+PriceScale*즉시익절1*N3);
Else
{
if L <= EntryPrice-PriceScale*즉시손절1 Then
ExitLong("즉시손절1",AtStop,L-PriceScale*저점손절틱수);
}
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*tr수익 Then
ExitLong("tr",AtStop, highest(H,BarsSinceEntry)-PriceScale*tr하락);
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1*N4 and C < O Then
ExitLong("저점에서 올라와서 본전 청산",atlimit,EntryPrice+PriceScale*본전생각틱);
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1 *N5 and CCIv >= CCI값1 and C < O Then
ExitLong("cci저점에서 올라와서 약손절");
if CrossDown(c,bbup) Then
ExitLong();
}
if bdate != bdate[1] Then
SetStopEndofday(0);
if sdate != sdate[1] and DayOfWeek(sdate) == 6 Then
SetStopEndofday(060000);
즐거운 하루되세요
> 이형지 님이 쓴 글입니다.
> 제목 : 매도 조건 하나더 추가 부탁드림니다.
> 기존 사용하고 있는 매수 청산 수식입니다.
아래식에 추가로 볼린저밴드의 현재봉이 볼린저밴드 상한선을 돌파한후에 다시 상한선을
깨고 내려오는 봉 종가에 청산 하는 수식 부탁드려요
if MarketPosition == 1 then
{
BuySetup = false;
if countif(CrossDown(CCIv,CCI값),BarsSinceEntry) >= 1 and
CCIv < CCI값 and C < O Then
ExitLong("매수cci청산");
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*즉시익절1 and C < O Then
ExitLong("즉시익절1");
if highest(H,BarsSinceEntry) >= (EntryPrice+PriceScale*즉시익절1*N2) Then
ExitLong("본전청산1",AtStop,EntryPrice+PriceScale*즉시익절1*N3);
Else
{
if L <= EntryPrice-PriceScale*즉시손절1 Then
ExitLong("즉시손절1",AtStop,L-PriceScale*저점손절틱수);
}
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*tr수익 Then
ExitLong("tr",AtStop, highest(H,BarsSinceEntry)-PriceScale*tr하락);
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1*N4 and C < O Then
ExitLong("저점에서 올라와서 본전 청산",atlimit,EntryPrice+PriceScale*본전생각틱);
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1 *N5 and CCIv >= CCI값1 and C < O Then
ExitLong("cci저점에서 올라와서 약손절");
}
if bdate != bdate[1] Then
SetStopEndofday(0);
if sdate != sdate[1] and DayOfWeek(sdate) == 6 Then
SetStopEndofday(060000);