커뮤니티

문의드립니다^^

프로필 이미지
체리피커
2023-06-13 12:42:01
792
글번호 169733
답변완료
아래 수식을 지표식으로 변환해 주심 감사하겠습니다~ 제가 실력이 모자라 해봤는데 잘안되네요~ㅜㅜ 부탁드립니다^^ inputs: ChanLength( 20 ),MALength( 50 ) ; var : hh(0),ll(0),cc(0); variables: UpperBand( 0 ),LowerBand( 0 ),MidBand( 0 ),LongOK( false ),ShortOK( false ), LowRef( 0 ),HighRef( 0 ),TriggerLine( 0 ),MAValue( 0 ),box(0) ; hh = c; ll = c; cc = c; UpperBand = Highest(hh, ChanLength ) ; LowerBand = Lowest(ll, ChanLength ) ; MAValue = ma(cc, MALength ) ; if ll == LowerBand then begin LowRef = ll ; LongOK = false ; ShortOK = true ; end ; if hh == UpperBand then begin HighRef = hh ; LongOK = true ; ShortOK = false ; end ; TriggerLine = .5 * ( HighRef + LowRef ) ; if LongOK == true Then { if LongOK != LongOK[1] Then { Buy(); } } if ShortOK == true Then { if ShortOK != ShortOK[1] Then { Sell(); } }
지표
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2023-06-13 13:30:00

안녕하세요 예스스탁입니다. 어떤 값을 지표를 출력해야 할지 알 수 없습니다. 매수조건이 만족하면 1, 매도조건이 만족하면 -1. 그외는 0으로 출력되게 작성해 드립니다. inputs: ChanLength( 20 ),MALength( 50 ) ; var : hh(0),ll(0),cc(0); variables: UpperBand( 0 ),LowerBand( 0 ),MidBand( 0 ),LongOK( false ),ShortOK( false ), LowRef( 0 ),HighRef( 0 ),TriggerLine( 0 ),MAValue( 0 ),box(0) ; hh = c; ll = c; cc = c; UpperBand = Highest(hh, ChanLength ) ; LowerBand = Lowest(ll, ChanLength ) ; MAValue = ma(cc, MALength ) ; if ll == LowerBand then begin LowRef = ll ; LongOK = false ; ShortOK = true ; end ; if hh == UpperBand then begin HighRef = hh ; LongOK = true ; ShortOK = false ; end ; TriggerLine = .5 * ( HighRef + LowRef ) ; Plot1(0); if LongOK == true Then { if LongOK != LongOK[1] Then { Plot1(1); } } if ShortOK == true Then { if ShortOK != ShortOK[1] Then { Plot1(-1); } } 즐거운 하루되세요 > 체리피커 님이 쓴 글입니다. > 제목 : 문의드립니다^^ > 아래 수식을 지표식으로 변환해 주심 감사하겠습니다~ 제가 실력이 모자라 해봤는데 잘안되네요~ㅜㅜ 부탁드립니다^^ inputs: ChanLength( 20 ),MALength( 50 ) ; var : hh(0),ll(0),cc(0); variables: UpperBand( 0 ),LowerBand( 0 ),MidBand( 0 ),LongOK( false ),ShortOK( false ), LowRef( 0 ),HighRef( 0 ),TriggerLine( 0 ),MAValue( 0 ),box(0) ; hh = c; ll = c; cc = c; UpperBand = Highest(hh, ChanLength ) ; LowerBand = Lowest(ll, ChanLength ) ; MAValue = ma(cc, MALength ) ; if ll == LowerBand then begin LowRef = ll ; LongOK = false ; ShortOK = true ; end ; if hh == UpperBand then begin HighRef = hh ; LongOK = true ; ShortOK = false ; end ; TriggerLine = .5 * ( HighRef + LowRef ) ; if LongOK == true Then { if LongOK != LongOK[1] Then { Buy(); } } if ShortOK == true Then { if ShortOK != ShortOK[1] Then { Sell(); } }
프로필 이미지

체리피커

2023-06-13 15:38:24

수정했습니다~ 감사합니다^^ > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의드립니다^^ > 안녕하세요 예스스탁입니다. 어떤 값을 지표를 출력해야 할지 알 수 없습니다. 매수조건이 만족하면 1, 매도조건이 만족하면 -1. 그외는 0으로 출력되게 작성해 드립니다. inputs: ChanLength( 20 ),MALength( 50 ) ; var : hh(0),ll(0),cc(0); variables: UpperBand( 0 ),LowerBand( 0 ),MidBand( 0 ),LongOK( false ),ShortOK( false ), LowRef( 0 ),HighRef( 0 ),TriggerLine( 0 ),MAValue( 0 ),box(0) ; hh = c; ll = c; cc = c; UpperBand = Highest(hh, ChanLength ) ; LowerBand = Lowest(ll, ChanLength ) ; MAValue = ma(cc, MALength ) ; if ll == LowerBand then begin LowRef = ll ; LongOK = false ; ShortOK = true ; end ; if hh == UpperBand then begin HighRef = hh ; LongOK = true ; ShortOK = false ; end ; TriggerLine = .5 * ( HighRef + LowRef ) ; Plot1(0); if LongOK == true Then { if LongOK != LongOK[1] Then { Plot1(1); } } if ShortOK == true Then { if ShortOK != ShortOK[1] Then { Plot1(-1); } } 즐거운 하루되세요 > 체리피커 님이 쓴 글입니다. > 제목 : 문의드립니다^^ > 아래 수식을 지표식으로 변환해 주심 감사하겠습니다~ 제가 실력이 모자라 해봤는데 잘안되네요~ㅜㅜ 부탁드립니다^^ inputs: ChanLength( 20 ),MALength( 50 ) ; var : hh(0),ll(0),cc(0); variables: UpperBand( 0 ),LowerBand( 0 ),MidBand( 0 ),LongOK( false ),ShortOK( false ), LowRef( 0 ),HighRef( 0 ),TriggerLine( 0 ),MAValue( 0 ),box(0) ; hh = c; ll = c; cc = c; UpperBand = Highest(hh, ChanLength ) ; LowerBand = Lowest(ll, ChanLength ) ; MAValue = ma(cc, MALength ) ; if ll == LowerBand then begin LowRef = ll ; LongOK = false ; ShortOK = true ; end ; if hh == UpperBand then begin HighRef = hh ; LongOK = true ; ShortOK = false ; end ; TriggerLine = .5 * ( HighRef + LowRef ) ; if LongOK == true Then { if LongOK != LongOK[1] Then { Buy(); } } if ShortOK == true Then { if ShortOK != ShortOK[1] Then { Sell(); } }