예스스탁
예스스탁 답변
2023-05-16 11:04:51
안녕하세요
예스스탁입니다.
1
추가진입을 하므로 설정창의 피라미딩탭에서
피라미딩을 다른진입신호만 허용으로 설정하고 적요하시면 됩니다.
input : period(10),multiple(3);
var : base(0),ATRV(0),upper_band(0),downtrend(0),lower_band(0),uptrend(0);
base = (H+L)/2;
atrv = ATR(Period);
upper_band = base + atrv*multiple;
lower_band = base - atrv*multiple;
if lowest(upper_band,period)[1] > upper_band Then
downtrend = upper_band;
if highest(lower_band[1],period)<lower_band Then
uptrend = lower_band;
if sTime >= 91000 and sTime < 143000 Then
{
if crossup(c[1], downtrend[1]) and c > downtrend Then
{
if MarketPosition == 0 Then
Buy("b1",OnClose,Def,2000);
if MarketPosition == 1 and MaxEntries == 1 Then
Buy("b2",OnClose,Def,500);
}
}
if MarketPosition == 1 Then
{
if CurrentContracts < CurrentContracts[1] Then
{
if LatestExitName(0) == "Bp1" Then
Condition1 = true;
if LatestExitName(0) == "Bp2" Then
Condition2 = true;
}
if Condition1 == False Then
ExitLong("Bp1",AtLimit,AvgEntryPrice*1.035,"",Floor(MaxContracts*0.3),1);
if Condition2 == False Then
ExitLong("Bp2",AtLimit,AvgEntryPrice*1.10,"",Floor(MaxContracts*0.5),1);
ExitLong("Bp3",AtLimit,AvgEntryPrice*1.50);
ExitLong("Bl",AtStop,AvgEntryPrice*0.85);
if crossdown(c[1], uptrend[1]) and c < uptrend Then
ExitLong();
}
Else
{
Condition1 = False;
Condition2 = False;
}
SetStopEndofday(151500);
2
input : period(10),multiple(3);
var : base(0),ATRV(0),upper_band(0),downtrend(0),lower_band(0),uptrend(0);
base = (H+L)/2;
atrv = ATR(Period);
upper_band = base + atrv*multiple;
lower_band = base - atrv*multiple;
if lowest(upper_band,period)[1] > upper_band Then
downtrend = upper_band;
if highest(lower_band[1],period)<lower_band Then
uptrend = lower_band;
if crossup(c[1], downtrend[1]) and c > downtrend Then
Find(1);
즐거운 하루되세요
> spar 님이 쓴 글입니다.
> 제목 : 지표 및 시스템 문의드립니다
> 수고많으십니다~~
번거롭게 해드렸네요...
간단하게 작성법을 알고, 응용하면 될줄알았는데 쉽지가않네요
다시한번 재문의 드립니다.
=================================
키움에서 쓰던
1. 시스템 매매를 예스트레이더에 맞게 변경하고 싶습니다.
2. 매수식을 이용한 검색 도 부탁드립니다
================================
1. 시스템 트레이딩
> 제목 : 매매식 및 매수매도 조건 설정 문의
조건설정
1차매수 : 2000주
2차매수 : 500주 ... 2차까지만 매수하고 싶습니다.
매도는
1차매도 : 평단대비 3.5% 상승시 비중의 30%만 매도 (최초 3.5%상승시 1번만 매도)
2차매도 : 평단대비 10% 상승시 비중의 50% 매도
나머지 전량매도 :
1. 매도조건 달성시
2. 평단대비 50% 달성시 (목표가)
3. 평단대비 -15% 하락시 손절
시간설정
1. 오전 09:10 부터 매수시작
2. 오후 02:30 부터는 신규매수 중지
3. 오후 03:15 보유종목 모두 청산
이렇게 하고 싶은데 어떻게 설정을 해야할까요??
(아래 매매식)
period = 10
multiple = 3
기본
base = (h + l) /2;
상단선
upper_band=base + atr(period)*multiple;
downtrend=valuewhen(1,lowest(upper_band(1),period)>upper_band,upper_band);
하단선
lower_band=base - atr(period)*multiple;
uptrend=valuewhen(1,highest(lower_band(1),period)<lower_band,lower_band);
매수
crossup( c(1), downtrend(1)) && c > downtrend
매도
crossdown( c(1), uptrend(1) ) && c < uptrend
========================================
3. 위 매수식을 이용한 "검색" 도 부탁드립니다
(아래조건에 해당하는 종목을 검색하고 싶은데 어떻게 하느지를 모르겠네요??)
period = 10
multiple = 3
기본
base = (h + l) /2;
상단선
upper_band=base + atr(period)*multiple;
downtrend=valuewhen(1,lowest(upper_band(1),period)>upper_band,upper_band);
하단선
lower_band=base - atr(period)*multiple;
uptrend=valuewhen(1,highest(lower_band(1),period)<lower_band,lower_band);
매수
crossup( c(1), downtrend(1) ) && c > downtrend