커뮤니티
문의 드립니다.
2012-03-12 10:14:18
281
글번호 48794
제가 setstoptrailing 대신 수익율에 따라 청산식을 따로 두었는데요. 전혀 적용이 안되는것 같아서 문의를 드립니다. 식에서 잘못된 부분이 있나요?
if MarketPosition == 1 Then{
if highest(H,BarsSinceEntry) >= EntryPrice*1.0015 and highest(H,BarsSinceEntry) < EntryPrice*1.002 Then
exitlong("매수청산1",AtStop,Highest(H,BarsSinceEntry)-(highest(H,BarsSinceEntry)-EntryPrice)*0.55);
if highest(H,BarsSinceEntry) >= EntryPrice*1.002 Then
exitlong("매수청산2",AtStop,Highest(H,BarsSinceEntry)-(highest(H,BarsSinceEntry)-EntryPrice)*0.5);
if highest(H,BarsSinceEntry) >= EntryPrice*1.004 Then
exitlong("매수청산3",AtStop,Highest(H,BarsSinceEntry)-(highest(H,BarsSinceEntry)-EntryPrice)*0.4);
}
if MarketPosition == -1 Then{
if Lowest(L,BarsSinceEntry) <= EntryPrice*0.9985 and Lowest(L,BarsSinceEntry) > EntryPrice*0.998 Then
ExitShort("매도청산1",AtStop,Lowest(L,BarsSinceEntry)+(EntryPrice-Lowest(L,BarsSinceEntry))*0.55);
if Lowest(L,BarsSinceEntry) <= EntryPrice*0.998 Then
ExitShort("매도청산2",AtStop,Lowest(L,BarsSinceEntry)+(EntryPrice-Lowest(L,BarsSinceEntry))*0.5);
if Lowest(L,BarsSinceEntry) <= EntryPrice*0.996 Then
ExitShort("매도청산3",AtStop,Lowest(L,BarsSinceEntry)+(EntryPrice-Lowest(L,BarsSinceEntry))*0.4);
}
답변 1
예스스탁 예스스탁 답변
2012-03-12 14:05:25
안녕하세요
예스스탁입니다.
식을 적용해 보았지만 정상적으로 신호발생되고
식상 빠로 문제가 되는 부분이 없습니다.
즐거운 하루되세요
> 이승준 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> 제가 setstoptrailing 대신 수익율에 따라 청산식을 따로 두었는데요. 전혀 적용이 안되는것 같아서 문의를 드립니다. 식에서 잘못된 부분이 있나요?
if MarketPosition == 1 Then{
if highest(H,BarsSinceEntry) >= EntryPrice*1.0015 and highest(H,BarsSinceEntry) < EntryPrice*1.002 Then
exitlong("매수청산1",AtStop,Highest(H,BarsSinceEntry)-(highest(H,BarsSinceEntry)-EntryPrice)*0.55);
if highest(H,BarsSinceEntry) >= EntryPrice*1.002 Then
exitlong("매수청산2",AtStop,Highest(H,BarsSinceEntry)-(highest(H,BarsSinceEntry)-EntryPrice)*0.5);
if highest(H,BarsSinceEntry) >= EntryPrice*1.004 Then
exitlong("매수청산3",AtStop,Highest(H,BarsSinceEntry)-(highest(H,BarsSinceEntry)-EntryPrice)*0.4);
}
if MarketPosition == -1 Then{
if Lowest(L,BarsSinceEntry) <= EntryPrice*0.9985 and Lowest(L,BarsSinceEntry) > EntryPrice*0.998 Then
ExitShort("매도청산1",AtStop,Lowest(L,BarsSinceEntry)+(EntryPrice-Lowest(L,BarsSinceEntry))*0.55);
if Lowest(L,BarsSinceEntry) <= EntryPrice*0.998 Then
ExitShort("매도청산2",AtStop,Lowest(L,BarsSinceEntry)+(EntryPrice-Lowest(L,BarsSinceEntry))*0.5);
if Lowest(L,BarsSinceEntry) <= EntryPrice*0.996 Then
ExitShort("매도청산3",AtStop,Lowest(L,BarsSinceEntry)+(EntryPrice-Lowest(L,BarsSinceEntry))*0.4);
}
다음글
이전글