Study iCustom()
You include the name of the indicator, you have to include ALL of the "inputs" to the indicator (if any), and specify which of the 8 index buffers ( the mode parameter) you will take the data from.
.
.
//+------------------------------------------------------------------+
//| OsMA.mq4 |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| https://www.metaquotes.net// |
//+------------------------------------------------------------------+
//
#property indicator_buffers 1
//---- indicator parameters
extern int FastEMA=12;
extern int SlowEMA=26;
extern int SignalSMA=9;
.
.
.
Therefore, a valid iCustom call is:
double iCustom( | string symbol, int timeframe, string name, ..., int mode, int shift) |
double valueOfIndex0ofOsMA = iCustom(Symbol(), 0, "OsMA", 12, 26, 9, 0, 0)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want to call osMA indicator in my EA.
Can anybody help me what changes I need to make to my EA to call a signal from osMA.