예스스탁
예스스탁 답변
2023-06-12 08:46:20
안녕하세요
예스스탁입니다.
Inputs: period(10), apower(0.75), highthreshold(.50), lowthreshold(1.05);
vars: highrange(0), lowrange(0), nhr(0), nlr(0), hrmax(0), lrmax(0);
highrange = high - low[period];
lowrange = low - high[period];
nhr = highrange/power(period,apower)/ATR(period);
nlr = lowrange/power(period,apower)/ATR(period);
hrmax = highest(nhr,period);
lrmax = lowest(nlr,period);
if hrmax > highthreshold and lrmax < lowthreshold then
buy("b",OnClose,Def,1);
if hrmax < highthreshold and lrmax > lowthreshold then
sell("s",OnClose,Def,1);
즐거운 하루되세요
> 고민중 님이 쓴 글입니다.
> 제목 : 수식 문의드립니다.
> 트레이드 스테이션용 수식을 예스트레이더수식으로 변환하고 싶습니다.
1)
Inputs: period(10), apower(0.75), highthreshold(.50), lowthreshold(1.05);
vars: highrange(0), lowrange(0), nhr(0), nlr(0), hrmax(0), lrmax(0);
{ high and low ranges }
highrange = high - low[period];
lowrange = low - high[period];
{ lowrange = low - low[period]; }
{ normalized ranges }
nhr = highrange/power(period,apower)/avgtruerange(period);
nlr = lowrange/power(period,apower)/avgtruerange(period);
hrmax = highest(nhr,period);
lrmax = lowest(nlr,period);
{ trading signals }
{ buy when inside the threshold values }
if hrmax > highthreshold and lrmax < lowthreshold then buy 1 contract this bar on close
{ sell when outside the threshold values }
else if hrmax < highthreshold and lrmax > lowthreshold then sell short 1 contract this bar on close;
2)