I mean when I have made an indicator in which I have set many parameters computed from some value.
Now I want to send orders according to these parameters which is produced in this indicator.
How shall I use these parameters in EA?
the indicator's main code is as below:
if(counted_bars>=First_Period) int i=Bars-counted_bars-1;
Print("First_Buffer[",i,"]: ",First_Buffer[i]," Second_Buffer[",i,"]: ",Second_Buffer[i]);
Now I want to use the parameters, First_Buffer[i] and Second_Buffer[i], in a EA when the two parameters was produced immediately.
How shall I return the two parameters in custom indicator and how to receive the two parameters in the EA?
in addition, sometime, I want to use two EA for one pair, how?
maybe open the pair two times and attach one for each chart? any other method?
4 choices : iCustom, Global Variables, File read/write, or copy the code to the EA (probably the best)
And for your information, parameters are your inputs, not the code's outputs.
For question two, yes that seems the only way, or have one EA processing both strategies (if you're at the stage where you will make actual trades, this is the best, since you wouldn't want to go long with one strategy and short with the other at the same time)
thanks for you reply, but I can't understand what is the meaning of " parameters are your inputs, not the code's outputs." ?
About your supply's 4 choices, I am trying the last one,"copy the code to the EA", in the fact, it very complicated.
So shall I get more information about the choices of " iCustom" and " Global Variables"?
especially "Global Variables", I mean how to define a parameter as "global variables" so that we can use it both in an indicator and an EA?
and what is the difference of "indicators" and "custom indicators" in MT4's Navigator?
You're trying to get the value of the Buffers. You're not trying to get the Parameters. Parameters are what you enter. Example: extern int Parameter1=1; Use the proper descriptions to avoid confusion for those trying to answer your question.
You get the value of the Buffers within an Expert Advisor by using the iCustom_Function.
iCustom( string symbol, int timeframe, string name, Parameters , int mode, int shift )