커뮤니티
부탁드립니다.
2013-08-27 17:59:14
129
글번호 66888
아래 1번의 시스템식과 2번의 시스템식을 하나의 차트에서 동시에 사용하려고 하는데요.
1번시스템 진입분은 1번시스템 청산조건에 의해서만 청산되고, 2번시스템진입분은 2번시스템청산조건에 의해서만 청산될 수 있는지요. stopprofittarget도 서로 달리 설정할 수 있는지요.
1번시스템
If 매수조건1 Then
Buy();
If 매수청산조건1 Then
Exitlong();
If 매도조건1 Then
Sell();
If 매도청산조건1 Then
Exitshort();
Setstopprofittarget(1,Pointstop);
2번시스템
If 매수조건2 Then
Buy();
If 매수청산조건2 Then
Exitlong();
If 매도조건2 Then
Sell();
If 매도청산조건2 Then
Exitshort();
Setstopprofittarget(2,Pointstop);
부탁드립니다.
답변 1
예스스탁 예스스탁 답변
2013-08-27 18:04:37
안녕하세요
예스스탁입니다.
각 진입함수에 모두 이름을 부여한 후에
이름별로 청산이 되게 하셔야 합니다.
강제청산도 풀어서 작성하셔야 합니다.
아래 내용 참고하시기 바랍니다.
If 매수조건1 Then
Buy("b1");
If 매수청산조건1 and IsEntryName("b1") == true Then
Exitlong("bx1");
If 매도조건1 Then
Sell("s1");
If 매도청산조건1 and IsEntryName("s1") == true Then
Exitshort("sx1");
if MarketPosition == 1 and IsEntryName("b1") == True Then
ExitLong("BP1",AtStop,EntryPrice+1);
if MarketPosition == -1 and IsEntryName("s1") == True Then
ExitLong("SP1",AtStop,EntryPrice-1);
If 매수조건2 Then
Buy("b2");
If 매수청산조건2 and IsEntryName("b2") == true Then
Exitlong("bx2");
If 매도조건2 Then
Sell("s2");
If 매도청산조건2 and IsEntryName("s2") == true Then
Exitshort("sx2");
if MarketPosition == 1 and IsEntryName("b2") == True Then
ExitLong("BP2",AtStop,EntryPrice+2);
if MarketPosition == -1 and IsEntryName("s2") == True Then
ExitLong("SP2",AtStop,EntryPrice-2);
즐거운 하루되세요
> 묘선낭자 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> 아래 1번의 시스템식과 2번의 시스템식을 하나의 차트에서 동시에 사용하려고 하는데요.
1번시스템 진입분은 1번시스템 청산조건에 의해서만 청산되고, 2번시스템진입분은 2번시스템청산조건에 의해서만 청산될 수 있는지요. stopprofittarget도 서로 달리 설정할 수 있는지요.
1번시스템
If 매수조건1 Then
Buy();
If 매수청산조건1 Then
Exitlong();
If 매도조건1 Then
Sell();
If 매도청산조건1 Then
Exitshort();
Setstopprofittarget(1,Pointstop);
2번시스템
If 매수조건2 Then
Buy();
If 매수청산조건2 Then
Exitlong();
If 매도조건2 Then
Sell();
If 매도청산조건2 Then
Exitshort();
Setstopprofittarget(2,Pointstop);
부탁드립니다.
다음글
이전글