예스스탁
예스스탁 답변
2022-09-07 16:07:38
안녕하세요
예스스탁입니다.
1
if MarketPosition == 1 Then
{
#첫청산
if CurrentContracts == MaxContracts Then
ExitLong("bp1",AtLimit,EntryPrice*1.1,"",Floor(CurrentContracts*0.5),1);
Else #일부 청산
ExitLong("bp2",AtLimit,EntryPrice*1.2);
}
2
If MarketPosition <= 0 and value1 == 1 and Condition1 == true Then
Buy("B1",AtStop,고[2,1]-PriceScale*a,1);
if MarketPosition == 1 Then
{
if L > EntryPrice*0.99 Then
Buy("bb2",AtLimit,EntryPrice*0.99,1);
if L > EntryPrice*0.98 Then
Buy("bb3",AtLimit,EntryPrice*0.98,1);
if L > EntryPrice*0.97 Then
Buy("bb4",AtLimit,EntryPrice*EntryPrice*0.97,1);
if L > EntryPrice*0.96 Then
Buy("bb5",AtLimit,EntryPrice*EntryPrice*0.96,1);
}
if MarketPosition == 1 Then
{
if H < EntryPrice*1.02 Then
ExitLong("bp1",AtLimit,EntryPrice*1.02,def,1);
if H < EntryPrice*1.04 Then
ExitLong("bp2",AtLimit,EntryPrice*1.04,def,1);
if H < EntryPrice*1.06 Then
ExitLong("bp3",AtLimit,EntryPrice*1.06,def,1);
if H < EntryPrice*1.08 Then
ExitLong("bp4",AtLimit,EntryPrice*1.08,def,1);
if H < EntryPrice*1.10 Then
ExitLong("bp5",AtLimit,EntryPrice*1.10,def,1);
ExitLong("bl",AtStop,EntryPrice*(1-LC/100));
}
즐거운 하루되세요
> 상중하 님이 쓴 글입니다.
> 제목 : 안녕하세요
> 안녕하세요
1.
아래 수식은 진입가 대비 10% 수익시 1계약 청산식입니다.
진입한(보유) 수량의 % 비율로 청산수식을 수정부탁드립니다.
예시는 보유 수량의 50%씩 두번 분할청산 되는 수식으로 부탁드려요.
ExitLong("bp1",AtLimit,EntryPrice*1.1,def,10);
2.
아래 수식으로 손절을 하는데요 분할진입시 익절,손절이 개별 진입시점기준으로 분산됨니다.
ex) 손절 1%예시
1차 진입가 100 일때 99 손절 , 2차 진입가 200 일때 198 손절
손절도 분할로 익절도 동일하게 분할 처리 됨니다.
익절,손절을 평균가로 하는 예제수식 부탁드립니다.
LC(손절변수)
SetStopLoss(LC,PercentStop);
-----------------------------------------------------------------
If MarketPosition <= 0 and value1 == 1 and Condition1 == true Then
Buy("B1",AtStop,고[2,1]-PriceScale*a,1);
if MarketPosition == 1 Then
{
if L > EntryPrice*0.99 Then
Buy("bb2",AtLimit,EntryPrice*0.99,1);
if L > EntryPrice*0.98 Then
Buy("bb3",AtLimit,EntryPrice*0.98,1);
if L > EntryPrice*0.97 Then
Buy("bb4",AtLimit,EntryPrice*EntryPrice*0.97,1);
if L > EntryPrice*0.96 Then
Buy("bb5",AtLimit,EntryPrice*EntryPrice*0.96,1);
}
if MarketPosition == 1 Then
{
if H < EntryPrice*1.02 Then
ExitLong("bp1",AtLimit,EntryPrice*1.02,def,1);
if H < EntryPrice*1.04 Then
ExitLong("bp2",AtLimit,EntryPrice*1.04,def,1);
if H < EntryPrice*1.06 Then
ExitLong("bp3",AtLimit,EntryPrice*1.06,def,1);
if H < EntryPrice*1.08 Then
ExitLong("bp4",AtLimit,EntryPrice*1.08,def,1);
if H < EntryPrice*1.10 Then
ExitLong("bp5",AtLimit,EntryPrice*1.10,def,1);
}
SetStopLoss(LC,PercentStop);
감사합니다.