Unisciti alla nostra fan page
Convenient use of indicators - libreria per MetaTrader 5
- Visualizzazioni:
- 3578
- Valutazioni:
- Pubblicato:
- 2017.01.18 10:02
- Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance
General
Originally written for myself, when I had to work with many indicators at once.
Each class consists of the multiple fields. They can be the same for all (for example, indicator handle, timeframe, period, price) and those required by the particular indicator. The class also contains functions that set and get those fields.
How to Use
Download the archive. Files with the .mqh extension (that have "cind" in the beginning of file name) should be placed to the folder with your Expert Advisor.
Files with indicator names (*.mq5) should be placed to the \MQL5\Indicators\ folder.
Indicator parameters can be set and modified using the class functions. For example:
Macd.SetSlowEma(MACD_Slow_EMA_Period); // Set the value of the slow EMA
Macd.SetSignalSma(MACD_Signal_SMA_Period); // Set the value of the signal SMA
Macd — object of the CIndMacd class.
Indicator value can be obtained by calling the corresponding function. For the "macd_histogram" indicator, it will look as follows:
double valueMacd = Macd.OutValueMacd(1); // Indicator value at the last bar
double valueSignal = Macd.OutValueSignal(1); // Signal line value at the last bar
One as the argument means that the value is taken for the last completed bar.
Conclusion
In short, this is all. If you have questions on usage - write in comments.
Tradotto dal russo da MetaQuotes Ltd.
Codice originale https://www.mql5.com/ru/code/16519
Semaphore signal indicator based on the RSI indicator, which features alerts, sending emails and push-notifications to mobile devices.
Exp_Delta_WPRThe Exp_Delta_WPR Expert Advisor is based on the Delta_WPR indicator color change.
Trading system based on the signals of the RSI_Slowdown indicator.
MFI_SlowdownSemaphore signal indicator based on the MFI indicator, which features alerts, sending emails and push-notifications to mobile devices.