예스스탁
예스스탁 답변
2022-01-24 12:34:57
안녕하세요
예스스탁입니다.
if MarketPosition >= 0 Then
{
if color == BLUE and var1 > 0 and L > var1-PriceScale*n Then
Sell("s",AtStop,var1-PriceScale*n,1);
}
if MarketPosition == 1 Then
{
value1 = Floor(MaxEntries/2)+1;
Sell("ss",AtStop,(var1[BarsSinceEntry]-PriceScale*n)-(PriceScale*n)*MaxEntries,value1);
if T == -1 and 고점[1,1] > 0 Then
ExitShort("sx1",AtStop,고점[1,1]+PriceScale*1);
if T == 1 and 고점[2,1] > 0 Then
ExitShort("sx2",AtStop,고점[2,1]+PriceScale*1);
}
if MarketPosition <= 0 Then
{
if Color == RED and Var2 > 0 and H < var2+PriceScale*n Then
Buy("b",AtStop,Var2+PriceScale*n,1);
}
if MarketPosition == 1 Then
{
value1 = Floor(MaxEntries/2)+1;
Buy("bb",AtStop,(var2[BarsSinceEntry]+PriceScale*n)+(PriceScale*n)*MaxEntries,value1);
if T == 1 and 저점[1,1] > 0 Then
Exitlong("bx1",AtStop,저점[1,1]-PriceScale*1);
if T == -1 and 저점[2,1] > 0 Then
Exitlong("bx2",AtStop,저점[2,1]-PriceScale*1);
}
즐거운 하루되세요
> 예스요 님이 쓴 글입니다.
> 제목 : 문의 드립니다.~~~~
> 수고하십니다~`
아래 수식을
모든 매매를 반대로 진입 청산하는 식으로 바꿀려면
어떻게 해야 하나요?
(예:매수 매도진입을 반대로 매도 매수 진입으로
그에따라 청산도 반대로 하는 식)
if MarketPosition <= 0 Then
{
if color == BLUE and var1 > 0 and L > var1-PriceScale*n Then
Buy("b",AtLimit,var1-PriceScale*n,1);
}
if MarketPosition == 1 Then
{
value1 = Floor(MaxEntries/2)+1;
Buy("bb",AtLimit,(var1[BarsSinceEntry]-PriceScale*n)-(PriceScale*n)*MaxEntries,value1);
if T == -1 and 고점[1,1] > 0 Then
ExitLong("bx1",AtLimit,고점[1,1]+PriceScale*1);
if T == 1 and 고점[2,1] > 0 Then
ExitLong("bx2",AtLimit,고점[2,1]+PriceScale*1);
}
if MarketPosition >= 0 Then
{
if Color == RED and Var2 > 0 and H < var2+PriceScale*n Then
Sell("s",AtLimit,Var2+PriceScale*n,1);
}
if MarketPosition == -1 Then
{
value1 = Floor(MaxEntries/2)+1;
Sell("ss",AtLimit,(var2[BarsSinceEntry]+PriceScale*n)+(PriceScale*n)*MaxEntries,value1);
if T == 1 and 저점[1,1] > 0 Then
ExitShort("sx1",AtLimit,저점[1,1]-PriceScale*1);
if T == -1 and 저점[2,1] > 0 Then
ExitShort("sx2",AtLimit,저점[2,1]-PriceScale*1);
}