Download MetaTrader 5

Is it possible, to get data from function() in an include file from a indicator???

To add comments, please log in or register
Publish your trading signal. Gain access to millions of traders!
ismirnix
36
ismirnix 2011.07.08 08:19 

Hello,

iam writing an EA and i use a custom indicator, that custom indicator script includes another file

#include <SignMod.mqh> 

In that file is a function, called: int getSignal(int cVal);

Normally the indicator calls the function and works with return value from getSignal().

How can i use this return value in my EA script, because OrderSend does not work in indicators, correct?

Step on New Rails: Custom Indicators in MQL5
  • 2009.11.23
  • Андрей
  • www.mql5.com
I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.
Andrei Moraru
1157
Andrei Moraru 2011.07.08 12:00  
Add a new buffer to this custom indicator and pass those values to this buffer. Your EA then will be able to read that indicator buffer. If adding a new buffer is too much for this purpose, you can use GlobalVariableSet() and GlobalVariableGet() functions.
Documentation on MQL5: Global Variables of the Terminal / GlobalVariableGet
  • www.mql5.com
Global Variables of the Terminal / GlobalVariableGet - Documentation on MQL5
To add comments, please log in or register