This script applies the average of each major MA (SMA, RMA, EMA, WVMA, WMA) to the MACD formula.
The logic is simple. When all 5 MA's are in agreement in direction, then then script will notify users of change. I posted this as a strategy to help show how logic does in back test. If you use my simple yet effective solution to find take profit locations, you can blow this back testing out of the water!!!
long = ma > ma[1] and ma1 > ma1[1] and ma2 > ma2[1] and ma3 > ma3[1] and ma4 > ma4[1] short = ma < ma[1] and ma1 < ma1[1] and ma2 < ma2[1] and ma3 < ma3[1] and ma4 < ma4[1]
alertcondition(long == true, title='MACD LONG SIGNAL', message='MACD LONG!') alertcondition(short == true, title='MACD SHORT SIGNAL', message='MACD SHORT!')
릴리즈 노트
Sorry for the confusion. I stumbled upon good results thinking I was using MACD formula. Turns out I was only using partial formula.
The mistake just goes to show how uncomplicated a script needs to be to give good back testing results even on a line chart.
릴리즈 노트
Updated version with 4H setting at 66 just to show better backtest. See comment section below to test other lookback periods for other timeframes
I also changed overlay to true to save space on your screen
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.