당사 팬 페이지에 가입하십시오
- 조회수:
- 7198
- 평가:
- 게시됨:
- 2018.03.28 10:08
-
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
One more in the series of a simple-to-do code examples in MetaTrader 5 (the main loop of this one has 6 lines of code).
This is a MACD that can use average for input price instead of using "pure" price. That can help in filtering some false signals, but the main purpose of this code is to show how simple some things can be done using MetaTrader 5. In addition to all usual options when it comes to this type of indicators, option to have color changes based on MACD slope change or MACD crossing signal line.
![RSI of average](https://c.mql5.com/i/code/indicator.png)
A very well known RSI of average is made with, all in all, 3 lines of a code in a main loop (color assignment on RSI slope change included in those 4 lines). This one can be used as template for some other indicator and can provide a simplicity solution for those that think that everything is very complicated in MetaTrader 5.
![Stochastic of T3](https://c.mql5.com/i/code/indicator.png)
This version of Stochastic Oscillator reduces the number of false alerts by smoothing the price prior to be used in the stochastic calculation. That makes a nice smooth stochastic as a result that can easily be used for trend trading systems.
![Schaff Trend Cycle](https://c.mql5.com/i/code/indicator.png)
The Schaff Trend Cycle (STC) indicator detects up and down trends long before the MACD. It does this by using the same Exponential Moving Averages (EMAs), but adds a cycle component to factor currency cycle trends. Since currency cycle trends move based on a certain amount of days, this is factored into the equation of the STC indicator to give more accuracy and reliability than the MACD.
![ErrorDesc](https://c.mql5.com/i/code/library.png)
Printing GetLastError() and MqlTradeResult retcode as text description.