커뮤니티
한가지만 더 부탁드릴께요~~
2019-01-04 15:45:54
160
글번호 124980
익절 청산 수식인데요...
봉완성후 익절틱수1가 넘으면 청산되는 수식인데요...
거기에다 봉완성이 되지 않더라도 가격 도달시 즉시 청산 하는 수식을 넎고 싶어요..
변수이름: 바로즉시익절틱수1 , 바로즉시익절틱수2
이변수이름으로 아래수식에 추가로 넣어주세요~~
if T == 1 then
SetStopProfittarget(PriceScale*익절틱수1, PointStop);
SetStopLoss(PriceScale*손절틱수1, PointStop);
if T == -1 then
SetStopProfittarget(PriceScale*익절틱수2, PointStop);
SetStopLoss(PriceScale*손절틱수2, PointStop);
답변 1
예스스탁 예스스탁 답변
2019-01-04 16:52:36
안녕하세요
예스스탁입니다.
if T == 1 then
{
SetStopProfittarget(PriceScale*익절틱수1, PointStop);
SetStopLoss(PriceScale*손절틱수1, PointStop);
if MarketPosition == 1 then
{
ExitLong("bl1",AtStop,EntryPrice-손절틱수1);
ExitLong("bp1",AtLimit,EntryPrice+익절틱수1);
}
if MarketPosition == -1 Then
{
ExitShort("sl1",AtStop,EntryPrice+손절틱수1);
ExitShort("sp1",AtLimit,EntryPrice-익절틱수1);
}
}
if T == -1 then
{
SetStopProfittarget(PriceScale*익절틱수2, PointStop);
SetStopLoss(PriceScale*손절틱수2, PointStop);
if MarketPosition == 1 then
{
ExitLong("bl2",AtStop,EntryPrice-손절틱수2);
ExitLong("bp2",AtLimit,EntryPrice+익절틱수2);
}
if MarketPosition == -1 Then
{
ExitShort("sl2",AtStop,EntryPrice+손절틱수2);
ExitShort("sp2",AtLimit,EntryPrice-익절틱수2);
}
}
즐거운 하루되세요
> 이형지 님이 쓴 글입니다.
> 제목 : 한가지만 더 부탁드릴께요~~
> 익절 청산 수식인데요...
봉완성후 익절틱수1가 넘으면 청산되는 수식인데요...
거기에다 봉완성이 되지 않더라도 가격 도달시 즉시 청산 하는 수식을 넎고 싶어요..
변수이름: 바로즉시익절틱수1 , 바로즉시익절틱수2
이변수이름으로 아래수식에 추가로 넣어주세요~~
if T == 1 then
SetStopProfittarget(PriceScale*익절틱수1, PointStop);
SetStopLoss(PriceScale*손절틱수1, PointStop);
if T == -1 then
SetStopProfittarget(PriceScale*익절틱수2, PointStop);
SetStopLoss(PriceScale*손절틱수2, PointStop);
다음글
이전글