예스스탁
예스스탁 답변
2024-10-30 15:56:42
안녕하세요
예스스탁입니다.
SetStopTrailing도 무포지션일때 해제되게 하셔야 합니다.
input : upls(1.5),uptr1(0),uptr2(2),upgl(6);
input : uupls(1.5),uuptr1(0),uuptr2(2),uupgl(6);
input : dnls(2.5),dntr1(1.75),dntr2(2),dngl(2.7);
input : ddnls(1.5),ddntr1(0),ddntr2(4.75),ddngl(10);
if MarketPosition== 1 Then
{
if IsEntryName("b1") == true Then
{
SetStopLoss(upls,PointStop);
SetStopTrailing(uptr2,uptr1,PointStop,1);
SetStopProfittarget(upgl,PointStop);
}
Else if IsEntryName("고갱진입") == true Then
{
SetStopLoss(uupls,PointStop);
SetStopTrailing(uuptr2,uuptr1,PointStop,1);
SetStopProfittarget(uupgl,PointStop);
}
}
else if MarketPosition== -1 Then
{
if IsEntryName("s1") == true Then
{
SetStopLoss(dnls,PointStop);
SetStopTrailing(dntr2,dntr1,PointStop,1);
SetStopProfittarget(dngl,PointStop);
}
Else if IsEntryName("저갱진입") == true Then
{
SetStopLoss(ddnls,PointStop);
SetStopTrailing(ddntr2,ddntr1,PointStop,1);
SetStopProfittarget(ddngl,PointStop);
}
}
Else
{
SetStopLoss(0);
SetStopProfittarget(0);
SetStopTrailing(0,0);
}
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 문의
> 아래 수식을 하나의 수식으로 운영하고 있습니다.
청산수식에 오류는 없는지 살펴주십시요.
항상 고맙습니다.
********************************************************************************
input : upls(1.5),uptr1(0),uptr2(2),upgl(6);
input : uupls(1.5),uuptr1(0),uuptr2(2),uupgl(6);
input : dnls(2.5),dntr1(1.75),dntr2(2),dngl(2.7);
input : ddnls(1.5),ddntr1(0),ddntr2(4.75),ddngl(10);
if MarketPosition== 1 Then
{
if IsEntryName("b1") == true Then
{
SetStopLoss(upls,PointStop);
SetStopTrailing(uptr2,uptr1,PointStop,1);
SetStopProfittarget(upgl,PointStop);
}
Else if IsEntryName("고갱진입") == true Then
{
SetStopLoss(uupls,PointStop);
SetStopTrailing(uuptr2,uuptr1,PointStop,1);
SetStopProfittarget(uupgl,PointStop);
}
}
else if MarketPosition== -1 Then
{
if IsEntryName("s1") == true Then
{
SetStopLoss(dnls,PointStop);
SetStopTrailing(dntr2,dntr1,PointStop,1);
SetStopProfittarget(dngl,PointStop);
}
Else if IsEntryName("저갱진입") == true Then
{
SetStopLoss(ddnls,PointStop);
SetStopTrailing(ddntr2,ddntr1,PointStop,1);
SetStopProfittarget(ddngl,PointStop);
}
}
Else
{
SetStopLoss(0);
SetStopProfittarget(0);
}