예스스탁
예스스탁 답변
2020-04-16 15:08:44
안녕하세요
예스스탁입니다.
1
input : 익절틱수(50),손절틱수(20);
Condition1 = stime >= 040000 and stime <₩ 060000;
if Condition1 == false then
{
진입수식
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : 익절틱수(50),손절틱수(20);
Condition1 = stime >= 150000 and stime <= 170000;
if Condition1 == false then
{
진입수식
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
3
input : 익절틱수(50),손절틱수(20);
Condition1 = stime >= 040000 and stime <= 060000;
Condition2 = stime >= 150000 and stime <= 170000;
if Condition1 == false and Condition2 == False then
{
진입수식
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
4
시뮬레이션 차트에서는 변수 최적화라는 기능이 있어
모든 변수가 숫자이어야 합니다.
외부변수 중에 true/false나 스트링이 있으면 적용이 되지 않습니다.
input : AA(true);
if AA == true then
{
실행
}
if AA == false then
{
실행
}
만약 기준에 위와 같이 작성된 변수가 있다면
기존에 true와 false로 지정하는 내용을 1과 0으로 대체하게 수정해 주셔야 합니다.
input : AA(1);
if AA == 1 then
{
실행
}
if AA == 0 then
{
실행
}
즐거운 하루되세요
> 임진사댁원장 님이 쓴 글입니다.
> 제목 : 진입금지와 익절 손절 설정 부탁
> 다음의 경우의 시스템 수식부탁드립니다.
<1>
시스템 식에서 오전4시부터 오전6시까지 진입금지, 익절 50틱, 손절20틱
<2>
시스템 식에서 오후 3시부터 오후 5시까지 진입금지, 익절 50틱, 손절20틱
<3>오전 4시부터 오전6시까지, 오후3시부터 오후5시까지 진입금지, 익절50틱, 손절20틱
<4>그리고 시물레이션에서 <논리값(참/거짓)이나 논리표현식이 와야 합니다>라는 문구가 뜨고 실행이 안되는 이유가 무엇인지요? 변수값 0을 false로 수정해도 수정이 안되고 그냥 0으로 표시가 됩니다.. 일반 실행차트에서는 변수값이 false로 나옵니다.
즉, 같은 시스템을 돌려도 일반 실행차트에서는 정상적으로 구현이 되고
시물레이션 차트에서는 위에서 처럼 <논리값(참/거짓)이나 논리표현식이 와야 합니다>라는 문구가 뜨는 이유가 무엇인지요?
임진사댁원장
2020-04-16 15:47:47
아래 시스템 수식을 시물레이션에서도 나올수 있도록 수정부탁드립니다.
input : length(20),mult(2);
var : atr_(0),max1(0),min1(0),max_(0),min_(0),is_uptrend_prev(false),is_uptrend(false);
var : stops(0),vstop_prev(0),vstop1(0),vstop(0),is_trend_changed(false);
atr_ = atr(length);
max1 = max(max_, close);
min1 = min(min_, close);
is_uptrend_prev = is_uptrend[1];
stops = iff(is_uptrend_prev,max1 - mult * atr_ , min1 + mult * atr_);
vstop_prev = vstop[1];
vstop1 = iff(is_uptrend_prev , max(vstop_prev, stops) , min(vstop_prev, stops));
is_uptrend = close - vstop1 >= 0;
is_trend_changed = is_uptrend != is_uptrend_prev;
max_ = iff(is_trend_changed , close , max1);
min_ = iff(is_trend_changed , close , min1);
vstop = iff(is_trend_changed ,iff(is_uptrend, max_ - mult * atr_ , min_ + mult * atr_),vstop1);
if is_uptrend == true and is_uptrend != is_uptrend[1] Then
Buy();
if is_uptrend == false and is_uptrend != is_uptrend[1] Then
SELL();