
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
indicator create the object , let EA to use it.
Of course you can, as long as you know the name of the object, or as long as it is the only object in the chart of any given type.
You just have to read the price property using ObjectGetDouble().
mql5 is not general language as delphi or c++. It's intended for trading program.
Anyway, why don't you reply to question if you need help ? I can't see a good reason to share an object, so I repeat my question : why do you need to use it in your EA ?
why do you need to use it in your EA ?
if I create a wave object by the indicator, and let EA use this wave object.
the define like this:
struct APoint
{
double price;
datetime time;
int Bar_ID;
};
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
class AWave :public CObject
{
public:
APoint A;
APoint B;
APoint C;
APoint D;
ABCD_TREND Dir;
short GroupId;
};
why do you need to use it in your EA ?
if I create a wave object by the indicator, and let EA use this wave object.
the define like this:
struct APoint
{
double price;
datetime time;
int Bar_ID;
};
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
class AWave :public CObject
{
public:
APoint A;
APoint B;
APoint C;
APoint D;
ABCD_TREND Dir;
short GroupId;
};
graphical objects? I think you can as long as you know the object name?
graphical objects? I think you can as long as you know the object name?
you are talking about chart Objects rather than . . .
yes, I know the object name, it is stored in a LIST, how to let EA know and use it?
objects in terms of Object Oriented programming . . .
If you want to communicate efficiently be very clear about your terms especially where there is scope for misunderstanding, i.e. Objects vs objects, Global variables vs globally declared variables, etc.
you are talking about chart Objects rather than . . .
objects in terms of Object Oriented programming . . .
If you want to communicate efficiently be very clear about your terms especially where there is scope for misunderstanding, i.e. Objects vs objects, Global variables vs globally declared variables, etc.
easy to understand:
I define this variabl in indicator:
string abc='ddddddd';
How to let EA use it?
It's not easy for an EA and an Indicator to share the in-memory object (instance of a complex type).
You'll have to use some workaround, for example:
1. The indicator writes object's information to a file and the EA read info from the file. Or
2. The indicator writes objects' information to an indicator buffer and EA read info from that buffer. This approach could be more complex.
It's not easy for an EA and an Indicator to share the in-memory object (instance of a complex type).
You'll have to use some workaround, for example:
1. The indicator writes object's information to a file and the EA read info from the file. Or
2. The indicator writes objects' information to an indicator buffer and EA read info from that buffer. This approach could be more complex.
Maybe you can make export function in indicator there that creates the wave object and the passes the pointer (descriptor) of this object to the EA for its use.
Good luck.
Maybe you can make export function in indicator there that creates the wave object and the passes the pointer (descriptor) of this object to the EA for its use.
Good luck.