커뮤니티
시스템 종료 문의 드립니다 (수정)
2014-04-17 11:50:15
203
글번호 74500
수고 하십니다
예스 글로벌을 사용하는 일인입니다
다름이 아니라
강제청산 수식이 필요해서 이렇게 글씁니다
복사기능이 없어서 화일 첨부 합니다
- 1. 74968_골든_데스_크로스.xlsx (0.01 MB)
답변 2
예스스탁 예스스탁 답변
2014-04-17 15:42:13
안녕하세요
예스스탁입니다.
Input : shortPeriod(5), longPeriod(20),하루이익(20),하루손실(20);
var : np(0),prenp(0),daypl(0);
np = NetProfit;
if date != date[1] Then
prenp = np[1];
daypl = np-prenp;
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
# 매수/매도청산
If CrossUP(value1, value2) and 하루이익 > daypl and daypl > -하루손실 Then
buy();
# 매도/매수청산
If CrossDown(value1, value2) and 하루이익 > daypl and daypl > -하루손실 Then
Sell();
if MarketPosition == 1 Then{
ExitLong("bx1",AtStop,EntryPrice+(-(하루손실)-(daypl)));
ExitLong("bx2",AtLimit,EntryPrice+((하루이익)-(daypl)));
}
if MarketPosition == -1 Then{
ExitShort("sx1",AtStop,EntryPrice+((하루손실)+(daypl)));
ExitShort("sx2",AtLimit,EntryPrice+(-(하루이익)+(daypl)));
}
즐거운 하루되세요
> YG_aa**** 님이 쓴 글입니다.
> 제목 : 시스템 종료 문의 드립니다 (수정)
> 수고 하십니다
예스 글로벌을 사용하는 일인입니다
다름이 아니라
강제청산 수식이 필요해서 이렇게 글씁니다
복사기능이 없어서 화일 첨부 합니다
회원
2014-04-17 16:43:38
답변해 주셔서 감사합니다...
이렇게 전문가가 친절히 도와주시니 넙쭉 인사가 저절로 나오네요.....
감사합니다.....
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 시스템 종료 문의 드립니다 (수정)
>
안녕하세요
예스스탁입니다.
Input : shortPeriod(5), longPeriod(20),하루이익(20),하루손실(20);
var : np(0),prenp(0),daypl(0);
np = NetProfit;
if date != date[1] Then
prenp = np[1];
daypl = np-prenp;
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
# 매수/매도청산
If CrossUP(value1, value2) and 하루이익 > daypl and daypl > -하루손실 Then
buy();
# 매도/매수청산
If CrossDown(value1, value2) and 하루이익 > daypl and daypl > -하루손실 Then
Sell();
if MarketPosition == 1 Then{
ExitLong("bx1",AtStop,EntryPrice+(-(하루손실)-(daypl)));
ExitLong("bx2",AtLimit,EntryPrice+((하루이익)-(daypl)));
}
if MarketPosition == -1 Then{
ExitShort("sx1",AtStop,EntryPrice+((하루손실)+(daypl)));
ExitShort("sx2",AtLimit,EntryPrice+(-(하루이익)+(daypl)));
}
즐거운 하루되세요
> YG_aa**** 님이 쓴 글입니다.
> 제목 : 시스템 종료 문의 드립니다 (수정)
> 수고 하십니다
예스 글로벌을 사용하는 일인입니다
다름이 아니라
강제청산 수식이 필요해서 이렇게 글씁니다
복사기능이 없어서 화일 첨부 합니다