함수설명
목표수익 강제청산
익절값을 0으로 지정하면 해제
작성방법
SetStopProfittarget(익절값, 손익단위);
C
복사
매개변수 설명
•
"익절값": 목표이익값. 양수로 지정
•
"손익단위": PointStop:포인트(원), PercentStop:퍼센트
생략하면 기본설정은 PercentStop
활용예시
1. 5% 익절
SetStopProfittarget(5);
SetStopProfittarget(5,PercentStop);
2. 1포인트 익절
SetStopProfittarget(1, PointStop);
3. 20틱 익절
SetStopProfittarget(20*PriceScale, PointStop);
4 강제청산 해제
//매수포지션만 목표수익 강제청산을 설정
//무포지션이나 매도포지션이면 해제
if MarketPosition == 1 Then
SetStopProfittarget(20*PriceScale, PointStop);
Else
SetStopProfittarget(0);//해제
C
복사
뒤로가기는 좌측상단의 목차 버튼을 눌러주세요.