커뮤니티
수식문의
2019-05-24 00:24:44
178
글번호 128935
안녕하세요
하기 수식 부탁드립니다.
파라볼릭 종가와 MACD oscillator가 3개봉이내에서
같은 신호를 나타내면 진입하는 수식 부탁드립니다.
신호발생이 3개봉을 넘어가면 진입하지 않습니다.
진입은 2개로하고 1개는 20틱에 익절
한개틱은 다음신호때까지 대기하는 것으로 부탁드립니다.
감사합니다.
답변 1
예스스탁 예스스탁 답변
2019-05-24 11:12:49
안녕하세요
예스스탁입니다.
Input : af(0.02), maxAF(0.2);
input : short(12),long(26),sig(9);
var1 = CSAR(af,maxAF);
var2 = MACD_OSC(short,long,sig);
if (CrossUp(c,var1) and var2 > 0 and countif(crossup(var2,0),3) >= 1) or
(CrossUp(var2,0) and c > var1 and countif(crossup(c,var1),3) >= 1) Then
buy("b",OnClose,def,2);
if (CrossDown(c,var1) and var2 < 0 and countif(CrossDown(var2,0),3) >= 1) or
(CrossDown(var2,0) and c < var1 and countif(CrossDown(c,var1),3) >= 1) Then
sell("s",OnClose,def,2);
if MarketPosition == 1 Then
ExitLong("bx",atlimit,EntryPrice+PriceScale*20,"",1,1);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,EntryPrice-PriceScale*20,"",1,1);
즐거운 하루되세요
> softtoug 님이 쓴 글입니다.
> 제목 : 수식문의
> 안녕하세요
하기 수식 부탁드립니다.
파라볼릭 종가와 MACD oscillator가 3개봉이내에서
같은 신호를 나타내면 진입하는 수식 부탁드립니다.
신호발생이 3개봉을 넘어가면 진입하지 않습니다.
진입은 2개로하고 1개는 20틱에 익절
한개틱은 다음신호때까지 대기하는 것으로 부탁드립니다.
감사합니다.