Integrate Custom Indicators & Expert Advisors

 
I have custom indicators I use right now that I want to attach to charts, and then utilize information from the custom indicators to guide an expert advisor with automated trading. How do I pull in variables from custom indicators into an EA to use for automated trading?
 
Calpurnia wrote >>
I have custom indicators I use right now that I want to attach to charts, and then utilize information from the custom indicators to guide an expert advisor with automated trading. How do I pull in variables from custom indicators into an EA to use for automated trading?

see iCustom function

 

Thanks, I'm able to pull the indicator itself in, now how do I have the EA act on the variables produced by the custom indicator. For instance, if the indicator is saying it is a good time to open a position, I want to pass that "YES" signal to the EA, and have the EA open an order?

 
Calpurnia:

Thanks, I'm able to pull the indicator itself in, now how do I have the EA act on the variables produced by the custom indicator. For instance, if the indicator is saying it is a good time to open a position, I want to pass that "YES" signal to the EA, and have the EA open an order?



double val=iCustom(NULL, 0, "SampleInd",13,1,0);

if(val>=Bid)
{
   // order opening
}
 
Let's say I want to pull in a string value into the EA. I am trying to comment the string value in the EA to get it to produce the correct variable. How do I isolate it so it comments the correct variable to he screen?
 

I really need some help with this please :(

I have some great custom indicators just sitting on the sidelines because I can't get the EA to import variables into its scripting

 
Calpurnia wrote >>

I really need some help with this please :(

I have some great custom indicators just sitting on the sidelines because I can't get the EA to import variables into its scripting

I do not understand what you are not understanding in the iCustom function: To select a result produced by your indicator just select it with the 'mode' parameter.

I don't know what you are trying to do with your string and what is stopping you... if you cannot use a string then use a digital code... for more help, please show the declaration of the data transmitted by your indicator and how you are trying to get them into your EA.

 
Calpurnia:

I really need some help with this please :(

I have some great custom indicators just sitting on the sidelines because I can't get the EA to import variables into its scripting

2 ways :

-Use the iCustom functions if your custom indicators is simple/without a lot o parameters or output signals.

-Use Global Variables (GVs) as outputs of your indicators. Ea will read these GVs and acts accordingly.


Dam.

Reason: