커뮤니티
재 질문 드립니다
2014-11-05 16:59:25
182
글번호 80135
오늘 38839 글에 답변을 해주셔셔 제가 가지고 있는 수식에 첨부를 했지만 선언되지 않은 매수 매도 조건이라고 나옵니다
제가 가지고 있는 수식은 이렇습니다
input : 시작시간(100000),끝시간(230000);
var : entry(false);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then
entry = true;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
entry = False;
var1 = Ema(c,60);
var2 = ema(H,60);
var3 = max(var1,var2);#2개 중 큰값
var4 = min(var1,var2);#2개중 작은값
#종가가 두개중 큰값보다 3틱이상 큼
if entry == true And
((MarketPosition == 0 and MarketPosition(1) != 1) or MarketPosition == -1)
and c >= var3+PriceScale*4 Then
buy();
#종가가 두개 중 작은값보다 3틱이상 작음
if entry == true And
((MarketPosition == 0 and MarketPosition(1) != -1) or MarketPosition == 1)
and c <= var4-PriceScale*4 Then
sell();
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then{
ExitLong();
ExitShort();
}
SetStopLoss(PriceScale*13,PointStop);
SetStopProfittarget(PriceScale*39,PointStop);
이 수식에 답변해주신
var : NP(0),PreNP(0),dayPL(0);
NP = NetProfit;
if date != date[1] Then
PreNP = NP[1];
dayPL = NP-PreNP;
#당일손익이 -150틱을 넘지않을때만 진입
if dayPL > -PriceScale*150 Then{
if 매수조건 Then
buy();
if 매도조건 Then
sell();
}
이 수식을 어떻게 수정해서 넣으면 될까요 ??
답변 1
예스스탁 예스스탁 답변
2014-11-05 17:24:46
안녕하세요
예스스탁입니다.
input : 시작시간(100000),끝시간(230000);
var : entry(false);
var : NP(0),PreNP(0),dayPL(0);
NP = NetProfit;
if date != date[1] Then
PreNP = NP[1];
dayPL = NP-PreNP;
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then
entry = true;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
entry = False;
var1 = Ema(c,60);
var2 = ema(H,60);
var3 = max(var1,var2);#2개 중 큰값
var4 = min(var1,var2);#2개중 작은값
#종가가 두개중 큰값보다 3틱이상 큼
if entry == true and dayPL > -PriceScale*150 And
((MarketPosition == 0 and MarketPosition(1) != 1) or MarketPosition == -1)
and c >= var3+PriceScale*4 Then
buy();
#종가가 두개 중 작은값보다 3틱이상 작음
if entry == true and dayPL > -PriceScale*150 And
((MarketPosition == 0 and MarketPosition(1) != -1) or MarketPosition == 1)
and c <= var4-PriceScale*4 Then
sell();
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then{
ExitLong();
ExitShort();
}
SetStopLoss(PriceScale*13,PointStop);
SetStopProfittarget(PriceScale*39,PointStop);
즐거운 하루되세요
> 필로게이스 님이 쓴 글입니다.
> 제목 : 재 질문 드립니다
> 오늘 38839 글에 답변을 해주셔셔 제가 가지고 있는 수식에 첨부를 했지만 선언되지 않은 매수 매도 조건이라고 나옵니다
제가 가지고 있는 수식은 이렇습니다
input : 시작시간(100000),끝시간(230000);
var : entry(false);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then
entry = true;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
entry = False;
var1 = Ema(c,60);
var2 = ema(H,60);
var3 = max(var1,var2);#2개 중 큰값
var4 = min(var1,var2);#2개중 작은값
#종가가 두개중 큰값보다 3틱이상 큼
if entry == true And
((MarketPosition == 0 and MarketPosition(1) != 1) or MarketPosition == -1)
and c >= var3+PriceScale*4 Then
buy();
#종가가 두개 중 작은값보다 3틱이상 작음
if entry == true And
((MarketPosition == 0 and MarketPosition(1) != -1) or MarketPosition == 1)
and c <= var4-PriceScale*4 Then
sell();
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then{
ExitLong();
ExitShort();
}
SetStopLoss(PriceScale*13,PointStop);
SetStopProfittarget(PriceScale*39,PointStop);
이 수식에 답변해주신
var : NP(0),PreNP(0),dayPL(0);
NP = NetProfit;
if date != date[1] Then
PreNP = NP[1];
dayPL = NP-PreNP;
#당일손익이 -150틱을 넘지않을때만 진입
if dayPL > -PriceScale*150 Then{
if 매수조건 Then
buy();
if 매도조건 Then
sell();
}
이 수식을 어떻게 수정해서 넣으면 될까요 ??
이전글