커뮤니티
부탁드립니다.
2015-04-27 09:12:02
201
글번호 85415
아래 수식이 쉽게 이해 될 수 있도록
수식 줄 옆으로 해설 주문을 붙여 주시면 감사 하겠습니다.
Inputs: ChanLen(20), Reaction(6), TCount(2), Setup(16);
Vars: HiChan(0), LoChan(0), LReaction(0), LReacHigh(0), LReacLow(0), SReaction(0),
SReacHigh(0), SReacLow(0), LThrust(0), SThrust(0), LEntry(0), LExit(0), SEntry(0), SExit(0),
NewLThrust(False), NewSThrust(False), LTR(False), STR(False);
#Assignment of values for the High/Low Channel
HiChan = Highest(High, ChanLen)[1];
LoChan = Lowest(Low, ChanLen)[1];
#Reversal Breakout - Initial Setup
IF MarketPosition <> 1 Then {
IF High > HiChan Then {
LReaction = 1;
LReacHigh = High;
LReacLow = Low;
LExit = LReacLow;
LThrust = 0;
SReaction = 0;
}
}
Else {
LReaction = 0;
LThrust = 0;
}
#Reversal Breakout - Initial Setup
IF MarketPosition <> -1 Then {
IF Low < LoChan Then {
SReaction = 1;
SReacHigh = High;
SReacLow = Low;
SExit = SReacLow;
SThrust = 0;
LReaction = 0;
}
}
Else {
SReaction = 0;
LThrust = 0;
}
#Upward Trend Resumption
IF LReaction >= 1 Then {
IF Low < LExit Then {
LExit = Low;
LThrust = 0;
}
IF High < LReacHigh AND Low < LReacLow Then {
LReaction = LReaction + 1;
LReacHigh = High;
LReacLow = Low;
NewLThrust = True;
}
}
#Downward Trend Resumption
IF SReaction >= 1 Then {
IF High > SExit Then {
SExit = High;
SThrust = 0;
}
IF Low > SReacLow AND High > SReacHigh Then {
SReaction = SReaction + 1;
SReacLow = Low;
SReacHigh = High;
NewSThrust = True;
}
}
#Bullish Thrust Day accumulation
IF LReaction >= Reaction AND Close > High[1] Then
LThrust = LThrust + 1;
#Bearish Thrust Day accumulation
IF SReaction >= Reaction AND Close < Low[1] Then
SThrust = SThrust + 1;
#Thrust Count Completion
LTR = LThrust == TCount AND NewLThrust;
STR = SThrust == TCount AND NewSThrust;
#Entry Price Setup
IF LTR Then {
LEntry = High + 0.1 ;
NewLThrust = False;
}
IF STR Then {
SEntry = Low - 0.1 ;
NewSThrust = False;
}
#Entries
IF MRO(LTR, Setup, 1) <> -1 Then
Buy("",atstop,LEntry);
IF MRO(STR, Setup, 1) <> -1 /*AND SReaction >= Reaction */Then
Sell("",atstop,SEntry);
#Exits
IF LReaction == 0 Then
ExitLong("",atstop,LExit);
IF SReaction == 0 Then
ExitShort("",atstop,SExit);
답변 1
예스스탁 예스스탁 답변
2015-04-27 13:05:05
안녕하세요
예스스탁입니다.
Inputs: ChanLen(20), Reaction(6), TCount(2), Setup(16);
Vars: HiChan(0), LoChan(0), LReaction(0), LReacHigh(0), LReacLow(0), SReaction(0),
SReacHigh(0), SReacLow(0), LThrust(0), SThrust(0), LEntry(0), LExit(0), SEntry(0), SExit(0),
NewLThrust(False), NewSThrust(False), LTR(False), STR(False);
#Assignment of values for the High/Low Channel
#1봉전 기준 20개봉 최고가
HiChan = Highest(High, ChanLen)[1];
#1봉전 기준 20개봉 최저가
LoChan = Lowest(Low, ChanLen)[1];
#Reversal Breakout - Initial Setup
#매수포지션이 아니면(무포지션이나 매도포지션)
IF MarketPosition <> 1 Then {
#고가가 직전20개봉 최고가보다 크면
IF High > HiChan Then {
LReaction = 1; #LReaction에 1저장
LReacHigh = High; #LReacHigh에 고가저장
LReacLow = Low;#LReacLow에 저가 저장
LExit = LReacLow; #LExit에 LReacLow저장
LThrust = 0; #LThrust에 0저장
SReaction = 0; #SReaction에 0저장
}
}
Else{#매수포지션이면
LReaction = 0;#LReaction에 0저장
LThrust = 0;#LThrust에 0저장
}
#Reversal Breakout - Initial Setup
#매도포지션이 아니면(무포지션이거나 매수포지션)
IF MarketPosition <> -1 Then {
#저가가 직전20개봉 최저가보다 작으면
IF Low < LoChan Then {
SReaction = 1; #SReaction에 1저장
SReacHigh = High;#SReacHigh에 고가자정
SReacLow = Low;#SReacLow에 저가 저장
SExit = SReacLow;#SExit에 SReacLow저장
SThrust = 0; #SThrust에 0저장
LReaction = 0;#LReaction에 저장
}
}
Else {
SReaction = 0;#SReaction에 0저장
LThrust = 0;#LThrust에 0저장
}
#Upward Trend Resumption
#LReaction가 1이상이면
IF LReaction >= 1 Then {
#저가가 LExit보다 작으면
IF Low < LExit Then {
#LExit에 저가 저장
LExit = Low;
#LThrust에 0저장
LThrust = 0;
}
#고가가 LReacHigh보다 작고 저가가 LReacLow보다 작으면
IF High < LReacHigh AND Low < LReacLow Then {
LReaction = LReaction + 1; #LReaction는 1증가
LReacHigh = High;#LReacHigh에 고가 저장
LReacLow = Low;#LReacLow에 저가 저장
NewLThrust = True;#NewLThrust에 true저장
}
}
#Downward Trend Resumption
#SReaction가 1이상이면
IF SReaction >= 1 Then {
#고가가 SExit보다 크면
IF High > SExit Then {
SExit = High; #SExit에 고가 저장
SThrust = 0;#SThrust에 0저장
}
#저가가 SReacLow보다 크고 고가가 SReacHigh보다 크면
IF Low > SReacLow AND High > SReacHigh Then {
SReaction = SReaction + 1; #SReaction 1증가
SReacLow = Low;#SReacLow에 저가저장
SReacHigh = High;#SReacHigh에 고가 저장
NewSThrust = True;#NewSThrust는 true저장
}
}
#Bullish Thrust Day accumulation
#LReaction가 Reaction이상이고 종가가 전봉 고가보다 크면
IF LReaction >= Reaction AND Close > High[1] Then
LThrust = LThrust + 1;#LThrust는 1증가
#Bearish Thrust Day accumulation
#SReaction가 Reaction이상이고 종가가 전봉 저가보다 작으면
IF SReaction >= Reaction AND Close < Low[1] Then
SThrust = SThrust + 1;#SThrust는 1증가
#Thrust Count Completion
#LThrust가 TCount이고 NewLThrust가 true이면 LTR은 true아니면 false
LTR = LThrust == TCount AND NewLThrust;
#SThrust가 TCount이고 NewLThrust가 true이면 STR 은 true아니면 false
STR = SThrust == TCount AND NewSThrust;
#Entry Price Setup
#LTR이 true이면
IF LTR Then {
LEntry = High + 0.1;#LEntry에 고가+0.1 저장
NewLThrust = False;#NewLThrust에 false저장
}
#STR이 true이면
IF STR Then {
SEntry = Low - 0.1;#SEntry에 저가-0.1저장
NewSThrust = False;#NewLThrust에 false저장
}
#Entries
#16개봉 안에 LTR이 발생했었으면
#LEntry값 이상의 시세가 발생하면 매수
IF MRO(LTR, Setup, 1) <> -1 Then
Buy("",atstop,LEntry);
#16개봉 안에 STR이 발생했었으면
#SEntry값 이하의 시세가 발생하면 매도
IF MRO(STR, Setup, 1) <> -1 /*AND SReaction >= Reaction */Then
Sell("",atstop,SEntry);
#Exits
#LReaction이 0일때 LExit이하의 시세 발생하면 매수포지션 청산
IF LReaction == 0 Then
ExitLong("",atstop,LExit);
#SReaction이 0일때 sExit이상의 시세 발생하면 매도포지션 청산
IF SReaction == 0 Then
ExitShort("",atstop,SExit);
즐거운 하루되세요
> 너무조아 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> 아래 수식이 쉽게 이해 될 수 있도록
수식 줄 옆으로 해설 주문을 붙여 주시면 감사 하겠습니다.
Inputs: ChanLen(20), Reaction(6), TCount(2), Setup(16);
Vars: HiChan(0), LoChan(0), LReaction(0), LReacHigh(0), LReacLow(0), SReaction(0),
SReacHigh(0), SReacLow(0), LThrust(0), SThrust(0), LEntry(0), LExit(0), SEntry(0), SExit(0),
NewLThrust(False), NewSThrust(False), LTR(False), STR(False);
#Assignment of values for the High/Low Channel
HiChan = Highest(High, ChanLen)[1];
LoChan = Lowest(Low, ChanLen)[1];
#Reversal Breakout - Initial Setup
IF MarketPosition <> 1 Then {
IF High > HiChan Then {
LReaction = 1;
LReacHigh = High;
LReacLow = Low;
LExit = LReacLow;
LThrust = 0;
SReaction = 0;
}
}
Else {
LReaction = 0;
LThrust = 0;
}
#Reversal Breakout - Initial Setup
IF MarketPosition <> -1 Then {
IF Low < LoChan Then {
SReaction = 1;
SReacHigh = High;
SReacLow = Low;
SExit = SReacLow;
SThrust = 0;
LReaction = 0;
}
}
Else {
SReaction = 0;
LThrust = 0;
}
#Upward Trend Resumption
IF LReaction >= 1 Then {
IF Low < LExit Then {
LExit = Low;
LThrust = 0;
}
IF High < LReacHigh AND Low < LReacLow Then {
LReaction = LReaction + 1;
LReacHigh = High;
LReacLow = Low;
NewLThrust = True;
}
}
#Downward Trend Resumption
IF SReaction >= 1 Then {
IF High > SExit Then {
SExit = High;
SThrust = 0;
}
IF Low > SReacLow AND High > SReacHigh Then {
SReaction = SReaction + 1;
SReacLow = Low;
SReacHigh = High;
NewSThrust = True;
}
}
#Bullish Thrust Day accumulation
IF LReaction >= Reaction AND Close > High[1] Then
LThrust = LThrust + 1;
#Bearish Thrust Day accumulation
IF SReaction >= Reaction AND Close < Low[1] Then
SThrust = SThrust + 1;
#Thrust Count Completion
LTR = LThrust == TCount AND NewLThrust;
STR = SThrust == TCount AND NewSThrust;
#Entry Price Setup
IF LTR Then {
LEntry = High + 0.1 ;
NewLThrust = False;
}
IF STR Then {
SEntry = Low - 0.1 ;
NewSThrust = False;
}
#Entries
IF MRO(LTR, Setup, 1) <> -1 Then
Buy("",atstop,LEntry);
IF MRO(STR, Setup, 1) <> -1 /*AND SReaction >= Reaction */Then
Sell("",atstop,SEntry);
#Exits
IF LReaction == 0 Then
ExitLong("",atstop,LExit);
IF SReaction == 0 Then
ExitShort("",atstop,SExit);
다음글
이전글