안녕하세요.
항상 수고가 많으십니다.
질문드립니다 -----------------------------------------------------------------------
input : stopper1(1.0);
input : stopper2(1.0);
if dayindex > 0 and stime < 152000 then
{
if 매수1 진입식 then
{
buy("b1");
}
if 매도1 진입식 then
{
sell("s1");
}
}
if IsEntryName("b1") == true Then
SetStopLoss(stopper1, PointStop);
if IsEntryName("s1") == true Then
SetStopLoss(stopper2, PointStop);
if IsEntryName("b1") == true and (stime == 151900 or CrossUp(stime, 151900)) Then
{
exitlong("b1청산");
}
if IsEntryName("s1") == true and (stime == 151900 or CrossUp(stime, 151900)) Then
{
exitshort("s1청산");
}
------------------------------------------------------------------------------------
위 전략식에서 매수든 매도든 최고수익에서 일정 포인트이상 수익 감소시
청산하는 식을 추가해 주시면 감사하겠습니다.
수익이 나다가 손절 당하는 경우가 많아서 그렇습니다.
물론, 수익이 지속 증가시 15시 19분에 청산합니다
도움 부탁드립니다.
감사합니다.
항상 좋은 일만 많이 생기시길를 ~~
답변 1
예스스탁
예스스탁 답변
2022-01-04 14:53:10
안녕하세요
예스스탁입니다.
input : stopper1(1.0);
input : stopper2(1.0);
input : downPoint(1);
if dayindex > 0 and stime < 152000 then
{
if 매수1 진입식 then
{
buy("b1");
}
if 매도1 진입식 then
{
sell("s1");
}
}
if IsEntryName("b1") == true Then
SetStopLoss(stopper1, PointStop);
if IsEntryName("s1") == true Then
SetStopLoss(stopper2, PointStop);
if MarketPosition == 1 Then
ExitLong("bx",AtStop,Highest(h,BarsSinceEntry)-downPoint);
if MarketPosition == -1 Then
ExitShort("sx",AtStop,lowest(l,BarsSinceEntry)+downPoint);
if IsEntryName("b1") == true and (stime == 151900 or CrossUp(stime, 151900)) Then
{
exitlong("b1청산");
}
if IsEntryName("s1") == true and (stime == 151900 or CrossUp(stime, 151900)) Then
{
exitshort("s1청산");
}
즐거운 하루되세요
> 샐리짱 님이 쓴 글입니다.
> 제목 : 최고수익에서 일정 포인트 수익 감소시 청산식 부탁드립니다
> 안녕하세요.
항상 수고가 많으십니다.
질문드립니다 -----------------------------------------------------------------------
input : stopper1(1.0);
input : stopper2(1.0);
if dayindex > 0 and stime < 152000 then
{
if 매수1 진입식 then
{
buy("b1");
}
if 매도1 진입식 then
{
sell("s1");
}
}
if IsEntryName("b1") == true Then
SetStopLoss(stopper1, PointStop);
if IsEntryName("s1") == true Then
SetStopLoss(stopper2, PointStop);
if IsEntryName("b1") == true and (stime == 151900 or CrossUp(stime, 151900)) Then
{
exitlong("b1청산");
}
if IsEntryName("s1") == true and (stime == 151900 or CrossUp(stime, 151900)) Then
{
exitshort("s1청산");
}
------------------------------------------------------------------------------------
위 전략식에서 매수든 매도든 최고수익에서 일정 포인트이상 수익 감소시
청산하는 식을 추가해 주시면 감사하겠습니다.
수익이 나다가 손절 당하는 경우가 많아서 그렇습니다.
물론, 수익이 지속 증가시 15시 19분에 청산합니다
도움 부탁드립니다.
감사합니다.
항상 좋은 일만 많이 생기시길를 ~~