커뮤니티

시스템 수식전환시 부탁드립니다

프로필 이미지
이대표
2020-04-12 18:28:34
737
글번호 137840
답변완료
<1>다음 지표에서 red가 그려질때 매수, blue가 그려지면 매도 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); plot1(vstop,"vstop",iff(is_uptrend ,red , BLUE)); <2> 빨간선일때 매수 파란선에 매도 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); plot1(vstop,"vstop",iff(is_uptrend ,red , BLUE)); <3>ema가 MA 상향돌파 매수, 반대일때 매도 input : MediaMovel(21),MediaMovelExponencial(9),MediaObv(50); var : src(0),obv(0),mav(0),emav(0),obvma(0); src = c; mav = ma(src,MediaMovel); emav = ema(src,MediaMovelExponencial); obvma = ma(obv,MediaObv);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-04-13 16:30:37

안녕하세요 예스스탁입니다. 1 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(); 2 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 Then buy(); Else sell(); 3 input : MediaMovel(21),MediaMovelExponencial(9),MediaObv(50); var : src(0),obv(0),mav(0),emav(0),obvma(0); src = c; mav = ma(src,MediaMovel); emav = ema(src,MediaMovelExponencial); obvma = ma(obv,MediaObv); if crossup(emav,mav) Then buy(); if CrossDown(emav,mav) Then sell(); 즐거운 하루되세요 > 이대표 님이 쓴 글입니다. > 제목 : 시스템 수식전환시 부탁드립니다 > <1>다음 지표에서 red가 그려질때 매수, blue가 그려지면 매도 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); plot1(vstop,"vstop",iff(is_uptrend ,red , BLUE)); <2> 빨간선일때 매수 파란선에 매도 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); plot1(vstop,"vstop",iff(is_uptrend ,red , BLUE)); <3>ema가 MA 상향돌파 매수, 반대일때 매도 input : MediaMovel(21),MediaMovelExponencial(9),MediaObv(50); var : src(0),obv(0),mav(0),emav(0),obvma(0); src = c; mav = ma(src,MediaMovel); emav = ema(src,MediaMovelExponencial); obvma = ma(obv,MediaObv);