커뮤니티
매도 로직 부탁 드립니다.
2018-07-23 21:19:32
139
글번호 120827
* 전일 매도 로직에 대해서는 좋은 점과 나뿐점이 동시에 있네요....
좀더 세밀히 검토해 봐야 겠습니다.
* 요청 사항 : 매도 신호 가 오면 바로 매도가 아닌
손절 2딕에서 매도 실행 되도록 로직 좀 요청드립니다.
var : S1(0),D1(0),TM(0),TF(0);
var1 = ma(c,5);
if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; }
if D1 > 0 then{ if sdate == D1 Then TM = TimeToMinutes(stime)-S1;
Else TM = TimeToMinutes(stime)+1440-S1;
if CrossUp(c,var1) Then buy("매수");
if CrossDown(c,var1) Then sell("매도");
SetStopProfittarget(PriceScale*50,PointStop);
SetStopLoss(PriceScale*20,PointStop);
}
* 더운 날씨에 고맙습니다.
- 1. 손절틱_요청.png (0.15 MB)
답변 1
예스스탁 예스스탁 답변
2018-07-24 10:39:00
안녕하세요
예스스탁입니다.
var : S1(0),D1(0),TM(0),TF(0);
var1 = ma(c,5);
if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; }
if D1 > 0 then{ if sdate == D1 Then TM = TimeToMinutes(stime)-S1;
Else TM = TimeToMinutes(stime)+1440-S1;
if CrossUp(c,var1) Then buy("매수");
if CrossDown(c,var1) Then sell("매도");
}
SetStopProfittarget(PriceScale*50,PointStop);
if MarketPosition == 1 Then
{
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 then
ExitLong("bx",AtLimit,EntryPrice);
}
if MarketPosition == -1 Then
{
if Highest(H,BarsSinceEntry) >= EntryPrice-PriceScale*20 then
ExitShort("sx",Atlimit,EntryPrice);
}
즐거운 하루되세요
> 요타 님이 쓴 글입니다.
> 제목 : 매도 로직 부탁 드립니다.
> * 전일 매도 로직에 대해서는 좋은 점과 나뿐점이 동시에 있네요....
좀더 세밀히 검토해 봐야 겠습니다.
* 요청 사항 : 매도 신호 가 오면 바로 매도가 아닌
손절 2딕에서 매도 실행 되도록 로직 좀 요청드립니다.
var : S1(0),D1(0),TM(0),TF(0);
var1 = ma(c,5);
if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; }
if D1 > 0 then{ if sdate == D1 Then TM = TimeToMinutes(stime)-S1;
Else TM = TimeToMinutes(stime)+1440-S1;
if CrossUp(c,var1) Then buy("매수");
if CrossDown(c,var1) Then sell("매도");
SetStopProfittarget(PriceScale*50,PointStop);
SetStopLoss(PriceScale*20,PointStop);
}
* 더운 날씨에 고맙습니다.