커뮤니티
문의드립니다.
if MarketPosition <= 0 Then
{
if 조건수식1 Then
{
if CurrentContracts < 1 Then
buy("매수1",OnClose,def,1);
}
}
if MarketPosition == 1 Then
{
if IsEntryName("매수1") == true Then
{
if 조건수식3 Then
{
if CurrentContracts < 1 Then
buy("수1",OnClose,def,1);
}
Else
{
if 조건수식4 and CurrentContracts < 2 Then
buy("수2",OnClose,def,1);
}
if 조건수식1 Then
{
exitlong("청산1",OnClose,def,"매수1");
}
Else
{
if 조건수식1-2 Then
exitlong("청산1-1",OnClose,def,"매수1");
}
if 조건수식2 Then
{
exitlong("청산2",OnClose,def,"수1");
}
Else
{
if 조건수식2-1 Then
exitlong("청산2-1",OnClose,def,"수1");
}
if 조건수식4 Then
{
exitlong("청산4",OnClose,def,"수2");
}
Else
{
if 조건수식4-1 Then
exitlong("청산4-1",OnClose,def,"수2");
}
ExitLong("bp1",atlimit,AvgEntryPrice+PriceScale*익절틱수1,"매수1");
ExitLong("bl1",AtStop,AvgEntryPrice-PriceScale*손절틱수1,"매수1");
ExitLong("bp2",atlimit,AvgEntryPrice+PriceScale*익절틱수2,"수1");
ExitLong("bl2",AtStop,AvgEntryPrice-PriceScale*손절틱수2,"수1");
ExitLong("bp4",atlimit,AvgEntryPrice+PriceScale*익절틱수4,"수2");
ExitLong("bl4",AtStop,AvgEntryPrice-PriceScale*손절틱수4,"수2");
}
}
피라미딩 사용한 후
여기에서 조건수식3가 3번 발생한다면
if 조건수식3 Then
{
if CurrentContracts < 1 Then
buy("수1",OnClose,def,1);
}
만약에
ExitLong("bp2",atlimit,AvgEntryPrice+PriceScale*익절틱수2,"수1"); 실행시
3번 실행한 평균값이 청산되나요.
아니면 익절틱수2 만큼 개별 청산되나요.
실제 실행하니 매수1 포함 피라미딩 전체의 평균값이 청산되나요.
피라미딩 사용에서 평균값 청산으로 사용한다면 어떤 믜미인가요.
답변 1
예스스탁 예스스탁 답변
2026-02-13 17:03:47