
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
Well, I was asking for an example for my situation. Obviously I haven't found a good example yet.
Well, I was asking for an example for my situation. Obviously I haven't found a good example yet.
Just replace the iCustom() parameters with the parameters you are using for some custom indicator and it will return correct values for those parameters
Ok, let's take it from the beginning.
Is this code ok in my indi?
#property indicator_buffers 2
double EABuffer[];
..
..
..
// PUT
if (AlignsForAput == true){
EABuffer[] = 1;}
// CALL
if (AlignsForAcall == true){
EABuffer[] = 2;}
EABuffer[] = 0;
[/CODE]
And how will the EA look like?
[CODE]
double FromIndicator;
FromIndicator = iCustom(NULL,0,"MyIndiForEA",1,0);
if (FromIndicator == 1)
// Make a PUT
if (FromIndicator == 2)
// Make a CALL
I probably don't have a clue about how the iCustom string should look like. And probably everything is wrong...
Ok, let's take it from the beginning.
Is this code ok in my indi?
#property indicator_buffers 2
double EABuffer[];
..
..
..
// PUT
if (AlignsForAput == true){
EABuffer[] = 1;}
// CALL
if (AlignsForAcall == true){
EABuffer[] = 2;}
EABuffer[] = 0;
[/CODE]
And how will the EA look like?
[CODE]
double FromIndicator;
FromIndicator = iCustom(NULL,0,"MyIndiForEA",1,0);
if (FromIndicator == 1)
// Make a PUT
if (FromIndicator == 2)
// Make a CALL
If your inetntion is to read the "MyIndiForEA"s second buffer current bar value, than it is OK. But as far as I see, you have just one buffer in the indicator, then the iCustom() call must be :
FromIndicator = iCustom(NULL,0,"MyIndiForEA",0,0);
Damn it... I can't get it to work.
Let's turn the question around. What is the best way to send instructions (as CALL and PUT) from my indicator to my EA?
Let's turn the question around. What is the best way to send instructions (as CALL and PUT) from my indicator to my EA?
You can not do that
The procedure is that the EA handles orders and collects indicators data
In that case you didnt read my first post at all..
So it is impossible to send for example a number for a call and another number for a put?
In that case you didnt read my first post at all.. So it is impossible to send for example a number for a call and another number for a put?
??
Please read my previous posts regarding that matter again (just in case that you missed some of them - there were quite a few that were addressing exactly the same matter, all asked by you). All is explained there and I sincerely doubt that there is a simpler way to explain it
_____________________
To make it sure that something is not" missed in translation" - your last question was :
The answer is that you can not send instructions from an indicator to an EA but you have to use iCustom() call from your EA to read state(s) of some custom indicator and then, based on those state(s) make a decision in your EA
_____________________
PS: I do not have a custom of answering to something I haven't read.
happy coding
English is not my mother language but I really didn't think that my question was that wrong. Instead of "marking words", lets find a solution to my problem. I try the question again.
What is the best way for my EA to recognize simple puts and calls from my indicator?
Obviously my code didn't work and I tried to change the "1" to a "0" as you told me to.