커뮤니티
부탁드립니다.
2016-01-31 21:20:49
97
글번호 94979
늘 감사드립니다.
1.
연속매수불가,연속매도불가를 위해 다음과 같이 지정해도 청산된 봉에서 바로 재진입이 이루어지고 있습니다. 청산된 봉에서 재진입이 이루어지지 않게 하려면 어떻게 해야 되나요?
condition1=Marketposition(1)==1 and marketposition==0;
condition2=Marketposition(1)==1 and marketposition==0;
If condition1==false and 매수조건 Then
Buy();
If 매수청산조건 Then
Exitlong();
2.
누적매수가 이루어진 경우에 진입방법별로 자기진입분만 각각 따로 청산시키려고 할 때 어떻게 해야 하는지요. 진입방법중에는 atlimit를 사용한 것(b1,b2,b3)도 있습니다.
bx1 : b1진입가 +0.10
bx2 : b2진입가 +0.20
bx3 : b3진입가 +0.30
bx4 : b4진입가 +0.40
bx5 :b 5진입가 +0.50
부탁드립니다.
답변 1
예스스탁 예스스탁 답변
2016-02-01 10:05:43
안녕하세요
예스스탁입니다.
1.
condition1 = MarketPosition != 1 or (MarketPosition == 0 and MarketPosition(1) != 1) ;
condition2 = MarketPosition != -1 or (MarketPosition == 0 and MarketPosition(1) != -1) ;
If condition1==true and 매수조건 Then
Buy();
If 매수청산조건 Then
Exitlong();
2
진입별로 진입가가 제공되지 않으므로
수식에서 저장하셔야 합니다.
var : E1(0),E2(0),E3(0),E4(0),E5(0);
if MarketPosition == 1 Then{
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "b1" Then
E1 = LatestEntryPrice(0);
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "b2" Then
E2 = LatestEntryPrice(0);
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "b3" Then
E3 = LatestEntryPrice(0);
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "b4" Then
E4 = LatestEntryPrice(0);
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "b5" Then
E5 = LatestEntryPrice(0);
ExitLong("bx1",atlimit,E1+0.1,"b1");
ExitLong("bx2",atlimit,E1+0.2,"b2");
ExitLong("bx3",atlimit,E1+0.3,"b3");
ExitLong("bx4",atlimit,E1+0.4,"b4");
ExitLong("bx5",atlimit,E1+0.5,"b5");
}
즐거운 하루되세요
> 묘선낭자 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> 늘 감사드립니다.
1.
연속매수불가,연속매도불가를 위해 다음과 같이 지정해도 청산된 봉에서 바로 재진입이 이루어지고 있습니다. 청산된 봉에서 재진입이 이루어지지 않게 하려면 어떻게 해야 되나요?
condition1=Marketposition(1)==1 and marketposition==0;
condition2=Marketposition(1)==1 and marketposition==0;
If condition1==false and 매수조건 Then
Buy();
If 매수청산조건 Then
Exitlong();
2.
누적매수가 이루어진 경우에 진입방법별로 자기진입분만 각각 따로 청산시키려고 할 때 어떻게 해야 하는지요. 진입방법중에는 atlimit를 사용한 것(b1,b2,b3)도 있습니다.
bx1 : b1진입가 +0.10
bx2 : b2진입가 +0.20
bx3 : b3진입가 +0.30
bx4 : b4진입가 +0.40
bx5 :b 5진입가 +0.50
부탁드립니다.